Tembo was founded in December 2022 with a mission to make the best Postgres service to deploy extensions. That mission has evolved since then to provi

Building a Managed Postgres Service in Rust: Part 1

submited by
Style Pass
2024-03-29 09:30:15

Tembo was founded in December 2022 with a mission to make the best Postgres service to deploy extensions. That mission has evolved since then to provide optimized Postgres instances for your workload, but let’s go back to the start. At the very minimum, we wanted our users to be able to come to Tembo Cloud, create a new Postgres instance, install Postgres extensions into that instance, and connect to that Postgres instance over the public internet.

With this early vision in place, we started to sketch out an architecture for our product. Drawing inspiration from other cloud platforms, we quickly decided that we would architect the platform with two high-level components—a control-plane and a data-plane. Two early assumptions were that 1) there could be many data-planes per control-plane, and 2) the control-plane may not always be able to reach the data plane (for example if the data-plane’s network is private, dedicated for one customer). So, these two components must stay highly decoupled. Making the decision to decouple the infrastructure enabled us to move quickly in the control-plane without risk of impacting the managed infrastructure in the data-plane.

The initial version of the control-plane consisted of just a web UI and a HTTP server. The HTTP server serves the purpose of handling Create, Read, Update, and Delete (CRUD) requests for Tembo instances. The server’s GET endpoints do things like list all the instances that belong to an organization or list all the attributes and configurations for a specific instance. PATCH routes handle updating instances with operations like restarting, installing an extension, or changing a configuration.

Leave a Comment