Home / Companies / SingleStore / Blog / Post Details
Content Deep Dive

Unlocking serversless MySQL

Blog post from SingleStore

Post Details
Company
Date Published
Author
Tanuj Mittal, Francisco Neves
Word Count
567
Language
English
Hacker News Points
-
Summary

The Shared Edition architecture of SingleStore is built on a "shared everything" model, initially relying on a single cluster, which posed a resiliency risk by being a single point of failure. To address this, a multi-cluster serverless architecture was developed, necessitating a complex integration of the traditional MySQL protocol. The core challenge was the "server-first" nature of the MySQL protocol, where crucial routing information is not available until after the client receives the server's initial handshake packet. To overcome this, SingleStore developed a custom SharedMysqlProxy that intercepts the MySQL handshake by generating a "fake hello packet" to extract necessary routing information early, enabling seamless routing across multiple clusters. This proxy uses Proxy Protocol version 2 (PPv2) to transfer the connection state to the appropriate cluster, enhancing resiliency by ensuring efficient and accurate routing while maintaining client experience. This solution specifically supports the Shared Edition by allowing multiple clusters to power it, thus improving system availability and resilience.