EP119: What do Amazon, Netflix, and Uber have in common?

EP119: What do Amazon, Netflix, and Uber have in common?

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)
͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­
Forwarded this email? Subscribe here for more

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

Get started


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.

No alt text provided for this image

Here are 8 must-know strategies to scale your system.

  1. Stateless Services
    Design stateless services because they don’t rely on server-specific data and are easier to scale.

  2. Horizontal Scaling
    Add more servers so that the workload can be shared.

  3. Load Balancing
    Use a load balancer to distribute incoming requests evenly across multiple servers.

  4. Auto Scaling
    Implement auto-scaling policies to adjust resources based on real-time traffic.

  5. Caching
    Use caching to reduce the load on the database and handle repetitive requests at scale.

  6. Database Replication
    Replicate data across multiple nodes to scale the read operations while improving redundancy.

  7. Database Sharding
    Distribute data across multiple instances to scale the writes as well as reads.

  8. 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.

  1. A Crash Course in Database Scaling Strategies

  2. A Crash Course in Database Sharding

  3. A Crash Course on Microservice Communication Patterns

  4. A Crash Course on Cell-based Architecture

  5. A Crash Course on Content-Delivery Networks (CDN)

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.

diagram

As a result, its Postgres database witnessed a whopping 100X growth.

  1. 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.

  2. 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.

  3. 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.

No alt text provided for this image

Here we delve into the best ways:

  1. Unit Testing: Ensures individual code components work correctly in isolation.

  2. Integration Testing: Verifies that different system parts function seamlessly together.

  3. System Testing: Assesses the entire system's compliance with user requirements and performance.

  4. Load Testing: Tests a system's ability to handle high workloads and identifies performance issues.

  5. Error Testing: Evaluates how the software handles invalid inputs and error conditions.

  6. 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

 
Like
Comment
Restack
 

© 2024 ByteByteGo
548 Market Street PMB 72296, San Francisco, CA 94104
Unsubscribe

Get the appStart writing


by "ByteByteGo" <bytebytego@substack.com> - 11:35 - 6 Jul 2024