Scalability and Performance of Web Applications, Approaches?

后端 未结 3 1047
深忆病人
深忆病人 2021-01-30 09:46

What various methods and technologies have you used to successfully address scalability and performance concerns of a website? I am an ASP.NET web developer exploring .NET remo

3条回答
  •  失恋的感觉
    2021-01-30 10:21

    I've worked on a few sites that get millions/hits/month. Here are some basics:

    1. Cache, cache, cache. Caching is one of the simplest and most effective ways to reduce load on your webserver and database. Cache page content, queries, expensive computation, anything that is I/O bound. Memcache is dead simple and effective.
    2. Use multiple servers once you are maxed out. You can have multiple web servers and multiple database servers (with replication).
    3. Reduce overall # of request to your webservers. This entails caching JS, CSS and images using expires headers. You can also move your static content to a CDN, which will speed up your user's experience.
    4. Measure & benchmark. Run Nagios on your production machines and load test on your dev/qa server. You need to know when your server will catch on fire so you can prevent it.

    I'd recommend reading Building Scalable Websites, it was written by one of the Flickr engineers and is a great reference.

    Check out my blog post about scalability too, it has a lot of links to presentations about scaling with multiple languages and platforms: http://www.ryandoherty.net/2008/07/13/unicorns-and-scalability/

提交回复
热议问题