Skip to content

Scaling up database writes

  1. Is the app making a ton of unnecessary writes or unnecessary indexes?
    1. (duplicate API calls)
  2. upgrade your machine
  3. Primary/secondary replication
    1. reads are handled by another machine
    2. the main machine only deals with writes
    3. introduces replication lag
  4. Horizontal partitioning
    1. will have multiple machines you can write to
    2. example: US database, Australia database
    3. split tables into separate machines
    4. join will be tough
    5. put users tweets into specific machines
  5. Sharding????

Sharding vs horizontal partitioning

Last update: 2022-09-23