Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Database Sharding for MACH Microservices: Global Scale Partitioning Strategies

In global-scale MACH architectures where an individual microservice handles tens of millions of records and thousands of transactions per second, vertical scaling of the database (increasing server CPU and RAM) has a physical and economic limit. Database Sharding (horizontal partitioning) is the technique that allows a database to scale beyond the capabilities of a single server.

Translated from Spanish Read in Spanish

Database sharding is a technique to scale a database beyond the capabilities of a single server by distributing data across multiple instances. It's typically considered when other scaling techniques, such as query optimization, caching, read replicas, and vertical scaling, are no longer sufficient. Indicators that a microservice needs sharding include write latency above 50ms, inability to add more read replicas, data volume over 10TB, and write throughput exceeding 50,000 transactions per second.

There are three main sharding strategies: Hash, Range, and Directory, each with its advantages and disadvantages. Citus, a PostgreSQL extension, is a mature and widely-adopted solution for implementing sharding in microservices that use PostgreSQL.

Summarised by urgent.news, not translated. Machine-written; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

How I’m Making Website Feedback Easier for Developers and Agencies

Have you ever received website feedback like “this section looks wrong” without knowing which section the client was talking about? I built PinReview to solve this problem.

  • PinReview simplifies website feedback for developers and agencies
  • Users pin comments to specific page spots, turning feedback into tasks
  • Embeddable widget and browser extension collect feedback easily

More from Friday 9 October →