Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Scalability for an API

$
0
0
  • We have developed an API for an app (iOS/Android).
  • Web servers (IIS), behind a load balancer, scale automatically.
  • 1 DB server (SQL Server).

The DB server is an AWS t2.large instance which performs fine (7% CPU average). However we are concerned about its scalability because upgrading the hardware has a limit. So we implemented transactional replication by launching another DB instance. Writes are performed in the Publisher and reads in the Subscriber.

Consider this typical scenario:

  1. A user posts an item in the app.
  2. API writes it in the Publisher
  3. App requests all items
  4. API reads items in the Subscriber
  5. The user does not receive the posted item

The problem is the latency (3-4 seconds) it takes to propagate a write from Publisher to Subscriber. How can we solve this? Obviously we pretend to avoid reads in the Publisher.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>