Scalability and Performance of Web Applications, Approaches?

后端 未结 3 1046
深忆病人
深忆病人 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:14

    There is velocity from MS as well as MEMCache has a port to .NET now and also indeXus.Net

    0 讨论(0)
  • 2021-01-30 10:15

    This is a very broad question making it difficult to answer, but I'll try and provide a few general suggestions.

    1 - Unless you are doing some things seriously wrong then you'll likely not need to worry about perf or scale until you hit a significant amount of traffic (over 1 million page views a month).

    2 - Your biggest performance problems initially are likely to be the page load times from other countries. Try the Gomez Instance Site Test to see the page load times from around the world, and use YSlow as a guide for optimizing.

    3 - When you do start hitting performance problems it will first most likely be due to the database work. Use the SQL Server Profiler to examine your SQL traffic looking for long running queries to try optimizing, and also use dm_db_missing_index_details to look for indexes you should add.

    4 - If your web servers start becoming the performance bottleneck, use a profiler to (such as the ANTS Profiler) to look for ways to optimize your web pages code.

    5 - If your web servers are well optimized and still running too hot, look for more caching opportunities, but you're probably going to need to simply add more web servers.

    6 - If your database is well optimized and still running too hot, then look at adding a distributed caching system. This probably won't happen until you're over 10 million page views a month.

    7 - If your database is starting to get overwhelmed even with distributed caching, then look at a sharding architecture. This probably won't happen until you're over 100 million page views a month.

    0 讨论(0)
  • 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/

    0 讨论(0)
提交回复
热议问题