Comment by zigzag312
5 years ago
> Whatever happened to use the proper data structures for the job?
This so much. People too often treat databases as magical black-boxes that should handle anything. Database is most often the bottleneck and choosing the proper storage engine with appropriate data structures can be 100x more efficient that just using the defaults. 1 server vs 100 can definitely make a noticeable difference in costs and system complexity.
While premature optimization is bad, choosing the right tool for the job is still somewhat important and will usually pay off in the long run.
I think your "most often" is more like 0.01%, I'd say the inverse is true, that _most_ would be fine with single sqlite host or something like rqlite.
rqlite author here. Happy to answer any questions about it.
https://github.com/rqlite/rqlite
Are you planning on adding websockets or something similar in the near future to support things like ie. data change notifications [0]?
[0] https://www.sqlite.org/c3ref/update_hook.html
What would you then consider to be the most common bottleneck?
I agree that there are many cases with low workload where that would be plenty.
Most common bottleneck is lack of competence.
Direct visible effects are wrong decisions entangled in spaghetti-like complexity.
It's hard to reach technical bottleneck in well designed systems. Computers are really fast novadays. They will vary greatly depending on what kind of system it is. Out of resources – cpu, memory, network, disk io – likely the weakest of them will be saturated first – network. But that's not a rule, it's easy to have system which will saturate ie. CPU before.
4 replies →
Money. The most common bottleneck is money and customers. Use whatever helps you get new customers faster.
Don't be scared of having to make changes in the future. Do the small amount of work it takes today to make sure your transition in the future is easy.
Transitioning from a SQL queue to redis it's only difficult if you have a bunch of SQL throughout your code. If you have that, you did it wrong.