This week’s system design refresher:
7 Must-know Strategies to Scale Your Database (Youtube video)
What do Amazon, Netflix, and Uber have in common?
100X Postgres Scaling at Figma
Best ways to test system functionality
SPONSOR US
Monitor AI Applications Built with NVIDIA NIM (Sponsored)
New Relic and NVIDIA released the first observability integration making it easy for companies to monitor the health and performance of their AI applications built with NVIDIA NIM.
Key features and use cases for AI monitoring include:
Full AI stack integration
Deep trace insights for every response
Model inventory
Deep GPU insights
Enhanced data security
7 Must-know Strategies to Scale Your Database
What do Amazon, Netflix, and Uber have in common?
They are extremely good at scaling their system whenever needed.
Here are 8 must-know strategies to scale your system.
Stateless Services
Design stateless services because they don’t rely on server-specific data and are easier to scale.Horizontal Scaling
Add more servers so that the workload can be shared.Load Balancing
Use a load balancer to distribute incoming requests evenly across multiple servers.Auto Scaling
Implement auto-scaling policies to adjust resources based on real-time traffic.Caching
Use caching to reduce the load on the database and handle repetitive requests at scale.Database Replication
Replicate data across multiple nodes to scale the read operations while improving redundancy.Database Sharding
Distribute data across multiple instances to scale the writes as well as reads.Async Processing
Move time-consuming and resource-intensive tasks to background workers using async processing to scale out new requests.
Over to you: Which other strategies have you used?
Latest articles
If you’re not a paid subscriber, here’s what you missed.
To receive all the full articles and support ByteByteGo, consider subscribing:
100X Postgres Scaling at Figma
With 3 million monthly users, Figma’s user base has increased by 200% since 2018.
As a result, its Postgres database witnessed a whopping 100X growth.
Vertical Scaling and Replication
Figma used a single, large Amazon RDS database.
As a first step, they upgraded to the largest instance available (from r5.12xlarge to r5.24xlarge).
They also created multiple read replicas to scale read traffic and added PgBouncer as a connection pooler to limit the impact of a growing number of connections.Vertical Partitioning
The next step was vertical partitioning.
They migrated high-traffic tables like “Figma Files” and “Organizations” into their separate databases.
Multiple PgBouncer instances were used to manage the connections for these separate databases.Horizontal Partitioning
Over time, some tables crossed several terabytes of data and billions of rows.
Postgres Vacuum became an issue and max IOPS exceeded the limits of Amazon RDS at the time.
To solve this, Figma implemented horizontal partitioning by splitting large tables across multiple physical databases.
A new DBProxy service was built to handle routing and query execution.
Over to you - Would you have done something differently?
Best ways to test system functionality
Testing system functionality is a crucial step in software development and engineering processes.
It ensures that a system or software application performs as expected, meets user requirements, and operates reliably.
Here we delve into the best ways:
Unit Testing: Ensures individual code components work correctly in isolation.
Integration Testing: Verifies that different system parts function seamlessly together.
System Testing: Assesses the entire system's compliance with user requirements and performance.
Load Testing: Tests a system's ability to handle high workloads and identifies performance issues.
Error Testing: Evaluates how the software handles invalid inputs and error conditions.
Test Automation: Automates test case execution for efficiency, repeatability, and error reduction.
Over to you:
How do you approach testing system functionality in your software development or engineering projects?
What's your company's release process look like?
SPONSOR US
Get your product in front of more than 500,000 tech professionals.
Our newsletter puts your products and services directly in front of an audience that matters - hundreds of thousands of engineering leaders and senior engineers - who have influence over significant tech decisions and big purchases.
Space Fills Up Fast - Reserve Today
Ad spots typically sell out about 4 weeks in advance. To ensure your ad reaches this influential audience, reserve your space now by emailing hi@bytebytego.com
But the cost of them doing this on their workers is substantial. And customers. They all get a raw deal.
The gig economy is fairly new but the way it’s currently run isn’t sustainable.