Database handling in application architecture
Data is always central to any application development, and scaling data has always been challenging. Handling data efficiently improves application latency and performance. In the earlier section Building a cache-based architecture, you learned how to handle frequently queried data by putting a cache in front of your database under the app caching pattern. You can put either a Memcached or Redis cache in front of your database, reducing the many hits on the database and improving database latency.
In application deployment, as your application’s user base grows, you need to handle more data with your relational database. You need to add more storage or vertically scale the database server by adding more memory and CPU power. Often, horizontal scaling is more complex when it comes to scaling relational databases. If your application is read-heavy, you can achieve horizontal scaling by creating a read replica. Route all read requests...