Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Techniques for writing a scalable website

I am new in the website scalability realm. Can you suggest to me some the techniques for making a website scalable to a large number of users?

like image 311
webkul Avatar asked Jul 12 '09 16:07

webkul


People also ask

What techniques can be used to achieve scalability?

We have two basic ways to achieve scalability, namely increasing system capacity, typically through replication, and performance optimization of system components.

What is a scalable website?

Scalable web architecture enables your web app to scale seamlessly with increased traffic. Compared to monolithic app design, scalable architecture can reduce costs while maintaining the required performance and functionality during cycles of growth.


2 Answers

  1. Test your website under heavy load.
  2. Monitor all statistics
  3. Find bottleneck
  4. Fix bottleneck
  5. Go back to 1

good luck

like image 184
Evert Avatar answered Sep 28 '22 02:09

Evert


If you expect your site to scale beyond the capabilities of a single server you will need to plan carefully. Design so the following will be possible:-

  • Make it so your database can be on a separate server. This isn't normally too hard.
  • Ensure all your static content can be moved to a CDN, as this will normally pull a lot of load off your servers.
  • Be prepared to spend a lot of money on hardware. More RAM and faster disks help a LOT.
  • It gets a lot harder when you need to split either the database or the php from a single server to multiple servers, so optimise everything, from your code, your database schema, your server config and anything else you can think of to put this final step off for as long as possible.

Other than that, all you can do is stress test your site, figure out where the bottlenecks are and try and design them away.

like image 37
Rik Heywood Avatar answered Sep 28 '22 02:09

Rik Heywood