4 ms·
I'd try the sharding route. Check out Vitess (https://vitess.io https://vitess.io), hopefully it works in your case, otherwise you can seek for similar alternat
by ecesena 9y ago
I'd try the sharding route. Check out Vitess (https://vitess.io https://vitess.io), hopefully it works in your case, otherwise you can seek for similar alternatives. It's a proxy that 1) makes sharding transparent, and 2) protects the db from bad queries. If you set this up for your app, perhaps later you can convince other apps to switch to it, improving the quality of the db overall.
A few other comments would be:
- do you have a read replica where you can do read-only queries? If not, that's also a good way to alleviate the burden on the primary db.
- would cache make sense? do you read often the same data and do joins every time? if so, I'd also consider a caching layer.