In this post, we talk about a simple yet commonly used database design pattern (setup): Read replica pattern. In this setup, all data-modifying commands like insert, delete, or update are sent to the primary DB and reads are sent to read replicas. The diagram below illustrates the setup:
One possible solution could be to return the status of the order creation in the primary database only after receiving acknowledgements from all of its replicas. By doing so, we can ensure that the data remains consistent across all database nodes when an order is created and communicated to the client.