![]() In that case, secondary read-only nodes would be an ideal way to scale capacity. Most database activity will be time table look-ups. If your app’s data pattern is read-heavy, that’s often an relatively easy model for scaling-out. However, it can have many secondary read-only nodes. If you choose to scale-out, then there’s another decision you need to make straight away: are you scaling reads or both reads and writes?Ī standard Postgres database can have just one primary node. It’s easier to scale out for reads than writes The database is a single point of failure Parts, and maybe all, of your database can stay online even if an individual node goes offline The entire database scales for both reads and writes Offers a long-term solution to scaling issues Takes up-front planning and ongoing maintenanceĭelivers a quick performance boost but with diminishing returns This takes more work than scaling up but means that you’re no longer piling more and more work onto a single database instance.Ĭan be very easy, especially if using a hosted Postgres service ![]() Scaling out –– otherwise known as horizontal scaling –– adds more database nodes that each take part of the workload. Not only are there limits to how large the database server can grow but you have an increasingly unwieldy single point of failure. Add more disk and you have more capacity both for the data itself and indexes to speed-up querying. Add RAM and more queries will run in memory rather than paging out to disk. Add more CPU and, broadly speaking, Postgres can handle more concurrent connections. Scaling up –– or vertical scaling –– is relatively easy. Scale-out: you add more database instances.Scale-up: you have one database instance but give it more memory, CPU, disk.That’s when it’s time to look at how to scale Postgres. There comes a point, though, when you’ve optimized everything and yet you just can’t squeeze any more performance out of your database layer. But that’s nothing compared to what’s happening in your Postgres instance. Those hacky bits of code you thought you could get away with suddenly become bottlenecks. You’re getting the uptake you wanted but now you have new problems.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |