Web 应用程序的可扩展性和性能、方法? [英] Scalability and Performance of Web Applications, Approaches?

查看:45
本文介绍了Web 应用程序的可扩展性和性能、方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您使用了哪些不同的方法和技术来成功解决网站的可扩展性和性能问题?我是一名 ASP.NET Web 开发人员,正在使用 WCF 和 SQL 集群探索 .NET 远程处理,并且对存在哪些其他方法(例如云")感到好奇.在哪些情况下,您会应用各种方法(例如,方法 a 用于大约 x 多个活跃"用户).

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 remoting with WCF with SQL clustering and am curious as to what other approaches exist (such as the ‘cloud’). In which cases would you apply various approaches (for example method a for roughly x many ‘active’ users).

我的意思的一个例子,一个 myspace 案例研究:http://highscalability.com/myspace-architecture

An example of what I mean, a myspace case study: http://highscalability.com/myspace-architecture

推荐答案

这是一个非常广泛的问题,很难回答,但我会尝试提供一些一般性建议.

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

1 - 除非您做了一些严重错误的事情,否则您可能无需担心性能或规模,直到您获得大量流量(每月浏览量超过 100 万次).

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 - 最初最大的性能问题可能是来自其他国家/地区的页面加载时间.尝试 Gomez Instance Site Test 以查看来自世界各地的页面加载时间,并使用 YSlow 作为优化指南.

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 - 当您开始遇到性能问题时,很可能首先是由于数据库工作.使用 SQL Server Profiler 检查您的 SQL 流量,寻找长时间运行的查询以尝试优化,并使用 dm_db_missing_index_details 寻找您应该添加的索引.

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 - 如果您的 Web 服务器开始成为性能瓶颈,请使用分析器(例如 ANTS Profiler)寻找优化网页代码的方法.

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 - 如果您的网络服务器优化良好但仍然运行过热,请寻找更多缓存机会,但您可能需要简单地添加更多网络服务器.

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 - 如果您的数据库优化得很好并且仍然运行得太热,那么考虑添加分布式缓存系统.除非您每月的页面浏览量超过 1000 万次,否则这种情况可能不会发生.

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 - 如果您的数据库即使使用分布式缓存也开始不堪重负,那么请查看分片架构.除非您每月的页面浏览量超过 1 亿次,否则这种情况可能不会发生.

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.

这篇关于Web 应用程序的可扩展性和性能、方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆