We use cookies to ensure you get the best experience on our website. For more details, refer to our cookie policy and privacy policy.
Discover how we dynamically scale databases based on predictable load patterns, and reduce costs by 50% while maintaining optimal performance.
Scaling servers based on application load is standard practice, but most teams miss an equally impactful opportunity: dynamically scaling databases. At Plotline, our usage follows clear daily patterns - intensive during peak hours, moderate during the day, and minimal at night. Keeping databases at peak size 24/7 proved unnecessarily expensive. We leveraged a simple Retool workflow to dynamically adjust database clusters, cutting costs dramatically without affecting performance. Here's how we did it.
Static Databases, Dynamic Load. Most databases and stream processors like MongoDB, RedShift, Redis, Kafka, Postgres and Clickhouse offer Admin APIs allowing you to resize clusters.
Yet, teams typically configure databases statically, running them at full scale continuously—even during off-peak hours when only 25% of resources are sufficient.This static approach leads to significant overspending. Our Solution: Time-based Dynamic Scaling of clusters.
We created an automated Retool workflow to adjust cluster sizes based on predictable load patterns:
The workflow triggers cluster resizing via API calls, scheduled precisely to match our known usage patterns.
The system we built works across multiple data centers, with each one tailored to the local time zone. Whether you're in North America, Europe, or Asia, the workflow runs on the local time in that region, ensuring that each data center operates optimally according to its local peak usage and demand. We've running this for over a year at Plotline and have seen it work reliably across managed DB providers.
Dynamic database scaling is simpler than many engineers realize. By taking advantage of Admin APIs and automating with Retool, teams can significantly reduce costs without sacrificing performance. If you're interested in setting up a similar workflow, or have thoughts on database scaling, we'd love to hear from you!
Join companies like ShareChat, Meesho, Jupiter, Jar, Khatabook and others that use Plotline to run in-app engagement and boost activation, retention and monetization.