High scalability technology stack [closed]

General Tech Technology & Software 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Technology & Software related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

I'm building a webservice that is going to be under ridiculous load (thousands to ten-thousands of queries per second). My normal stack of apache, PHP, memcache and some DB will be able to handle it with a nice load balancer infront and lots of machines, but I'm wondering if there are better solutions.

The endpoint will be hit by a beacon (via javascript on the client), I'll read the user's cookies, pull some small info on them from the DB, cache it, do some small calculation, send the response and if needed write to the DB and invalidate the cache.

And good technology choices and/or hardware recommendations?

profilepic.png
manpreet 2 years ago

This isn't the kind of question that can be answered here in anything other than a broad overview. Some general pointers:

  • Hardware: the two choices are basically lots of small, cheap boxes or fewer number of more powerful boxes. Cheaper boxes are, well, cheaper but typically consume a lot more power for the same CPU or memory (whichever is important to you) than bigger boxes. People often forget about the sometimes significant cost of power consumption;
  • Backend: you have a few choices from the big end of town (Oracle, SQL Server) to the commoditzed end (MySQL). MySQL is obviously cheaper and you can go far on MySQL but there is no question that Oracle (which I'm more familiar with than SQL Server) has a better optimizer, is more capable and is more robust than MySQL. You will however pay for it;
  • Budget: this is a huge factor as it might be worth paying for good commercial software rather than paying development costs to use "free" software. Software development is one of the most expensive costs of all;
  • Vertical and horizontal scalability: the question you're basically seeking to answer here is do you build up (bigger boxes, etc) or build out (clustered environments). The most scalable solutions have near-linear horizontal scalability but in the shorter term vertical scalability can be cheaper.

As for your normal stack, I'd stick with it unless you've got a particular requirement you haven't mentioned that prohibits it. After all PHP is a proven technology that runs 4 or so of the top 20 sites on the Internet (Facebook, Wikipedia, Flickr and I think Yahoo). If it's good enough for them, it's good enough for you.

More importantly, you know it. Technology stacks you know trump technology stacks you don't in almost every case. Beware the "greener pasture" trap of the latest hyped-up technology stack.

Memcache is good. The other thing you might want to consider adding to the mix is beanstalkd as a distributed work queue processor.

One important question to answer is: how well can you partition your application? Applications that easily lend themselves to partitioning are far easier to scale. Those that aren't tend to be modified in some way to make them easier to partition.

A good example of this is a simple sharetrading application. You can could partition market information based on stock code (A-C on one server, D-F on another and so on). For many such application that will work well.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.