Company
Date Published
Author
Liz van Dijk
Word count
762
Language
English
Hacker News points
119

Summary

A serverless computing architecture allows individual components of a stack to be designed and horizontally scaled, allocating more computing resources on the fly as needed. However, databases pose a challenge with connection limits, forcing developers to use proxies like pgbouncer to handle small workloads. MySQL's memory allocation is critical for isolation guarantees, but raising its max_connections variable can lead to dangerous crashes and downtime. Connection pooling, such as that offered by Vitess and PlanetScale, safeguards and optimizes database management, while also scaling alongside the cluster. By using a combination of connection pooling and the PlanetScale Global Routing Infrastructure, developers can maintain nearly limitless connections, even with large-scale applications like those running one million active MySQL connections. This architecture enables horizontal scaling beyond arbitrary limits, making it suitable for serverless function workloads.