Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resolving Overloaded Webserver Issues

I am new to the area of web development and currently interviewing companies, the most favorite questions among what people ask is:

How do you scale your webserver if it starts hitting a million queries?

What would you do if you have just one database instance running at that time? how do you manage that?

These questions are really interesting and I would like to learn about them.
Please pour in your suggestions / practices (that you follow) for such scenarios

Thank you

like image 220
daydreamer Avatar asked Dec 06 '22 00:12

daydreamer


1 Answers

How to scale:

  • Identify your bottlenecks.
  • Identify the correct solution for the problem.
  • Check to see you you can implement the correct solution.
  • Identify alternate solution and check

Typical Scaling Options:

  • Vertical Scaling (bigger, faster server hardware)
  • Load balancing
  • Split tiers/components out onto more/other hardware
  • Offload work through caching/cdn

Database Scaling Options:

  • Vertical Scaling (bigger, faster server hardware)
  • Replication (active or passive)
  • Clustering (if DBMS supports it)
  • Sharding
like image 161
dietbuddha Avatar answered Jan 11 '23 05:01

dietbuddha