4 ms·
> Uses MySQL or Postgres as the datastore, deployed to a single instance, with frequent data backups to cloud storage this does not seem to be "ready for horiz
by riffraff 14y ago
> Uses MySQL or Postgres as the datastore, deployed to a single instance, with frequent data backups to cloud storage
this does not seem to be "ready for horizontal scaling in the future".
I don't know whether you have multiple slaves, and TFA itself says that they'd scale the database _vertically_, I'm just stating that there's a pretty important mismatch between what you say and what the article says.
- zhoutong 14y agoWell, it's true that database isn't horizontal-scaling-ready as described in the OP. But for many web apps, the database is not the bottleneck. Efforts should be spent on memory caching and NoSQL long before vertical scaling generates diminishing returns. Of course, it's easy to add a master-slave replication to a single database instance when the need arises, even possible without downtime. So I assume most RDBMSs to be horizontal-scaling-ready. The difficult part is the app stack. We need to be able to deploy more instances in minutes, not hours or days. If at the beginning we cram everything (Nginx, Unicorn and MySQL) into a single dedicated server it can be really difficult to increase the capacity in the future without downtime or additional expense. Instead, even if you don't need the power of several dedicated servers, it's worthwhile to virtualize a single server and split into a few boxes and make them horizontal-scaling-ready. Then you can clone, resize and migrate the instances. This is what I do to increase the capacity of my app in a few minutes: 1. Create a new instance, and load the pre-built app image 2. Assign an IP address and add it to the DNS (like app-3.nameterrific.net pointing to an internal IP) 3. Add the app server to deploy.rb (for Capistrano) 4. cap deploy 5. Add the IP to load balancer That's it. This stack can be used from day one affordably and it can scale to potentially billions of visitors.
- smharris65 14y ago>But for many web apps, the database is not the bottleneck. Really? I think the database is usually the bottleneck in most web apps. That's why you cache data: to avoid hitting the database.
- spullara 14y agoWrites to the DB (and more importantly replication since it is single threaded in mysql) are often the bottleneck that is hard to scale. Write through caches can scale reads up very high. It takes a long time to hit the write limit for most applications so often read slaves and memcache is sufficient.