A LinkedIn friend with an amazing proof-of-concept web application recently asked me how to scale it. That’s an excellent question — but the short, and probably very unsatisfying answer I gave, was to wait and see until performance drops, and address the most significant contributor to the drop in performance. Lather, rinse, repeat.

一个拥有令人惊叹的概念验证网络应用程序的LinkedIn朋友最近问我如何扩展它。 这是一个很好的问题,但是我给我的简短且可能非常不令人满意的答案是等待观察,直到性能下降为止,并解决造成性能下降的最重要因素。 泡沫,冲洗,重复。

I can picture readers with thought-bubbles full of objections at this point: what about Content Delivery Network (CDN), caching, load balancers and auto-scalers, etc.? Yes, they are all great tactics — but only when needed. If your web site traffic peaks at 1,000 requests per hour, then setting up caching, load balancers and multiple web server instances adds complexity and increases operational cost without adding any value. On the other hand, if you are certain your web site will receive millions of users on a daily basis, then you should definitely architect for that kind of load from the very beginning. Doing so comes at a big effort and operational cost, so I hope you’re right in your projections.

现在,我可以为读者带来很多反对意见,例如: 内容分发网络(CDN) , 缓存 , 负载均衡器和自动缩放器等? 是的,它们都是很棒的策略-但只有在需要时才可以。 如果您的网站流量达到每小时1,000个请求的峰值,那么设置缓存,负载平衡器和多个Web服务器实例会增加复杂性并增加运营成本,而不会增加任何价值。 另一方面,如果您确定您的网站每天会收到数百万的用户,那么您绝对应该从一开始就设计这种负载。 这样做需要付出很大的努力和运营成本,所以我希望您的预测是正确的。

You will likely be able to keep up with your site’s growth in most scenarios as long as you watch the site performance like a hawk, and swoop in when growth causes the numbers to trend upwards.

只要您像观察鹰一样观察网站的性能,并且在增长导致数字呈上升趋势时大刀阔斧,您在大多数情况下就可以跟上网站的增长。

The following advice is a distillation of experiences I’ve picked up throughout my career as a software engineer and software architect. I’ve worked on large scale e-commerce web sites, mission-critical enterprise systems with hundreds of sites spanning vast geographical areas and millions lines of code, and performance engineered an e-commerce web site that prepared for tens of millions of customers trying to claim a limited number of inventory in scheduled sales events.

以下建议是我作为软件工程师和软件架构师在整个职业生涯中积累的经验的总结。 我曾在大型电子商务网站,关键任务企业系统上工作,其中有数百个站点分布在广阔的地理区域和数百万行代码中,并且性能出色地设计了一个电子商务网站,为数以千万计的客户提供了尝试在预定的销售活动中声明数量有限的库存。

This article will not to make you an expert in performance engineering, but hopefully it will give you a broad idea of indicators and matching tactics, pointers for techniques and concepts to read up on, and maybe ideas where to look next when a performance indicator goes red, and you need to figure out where to start.

本文不会使您成为性能工程方面的专家,但希望它可以为您提供广泛的指标和匹配策略的概念,可以继续学习的技术和概念的指针,以及可能在性能指标走到哪里时的下一步思路红色,您需要弄清楚从哪里开始。

页面响应时间 (Page Response Times)

Photo by Carlos Muza on Unsplash
卡洛斯·穆萨 ( Carlos Muza)在 Unsplash上 拍摄的照片

Companies promoting or doing business over the Internet have learned that Search Engine Optimization (SEO) and page response times are key factors to grow, retain and convert visitors. In my experience, SEO is largely driven by marketing and product input, while page load time is very much an engineering responsibility.

通过互联网促进或开展业务的公司已经了解到, 搜索引擎优化(SEO)和页面响应时间是增加,保留和转化访问者的关键因素。 以我的经验,SEO在很大程度上受市场和产品投入的驱动,而页面加载时间在很大程度上是工程责任。

Bounce rates (people visiting and quickly leaving the site), lower conversion rates (people who complete a purchase) are top key performance indicators (KPI) of sites that generate revenue from visitors. Higher bounce rates and lower conversion rates equals lower revenue.

跳出率 (访问并Swift离开网站的人),较低的转化率 (完成购买的人)是最关键的绩效指标 (KPI) 从访问者那里产生收入的网站。 较高的跳出率和较低的转化率等于较低的收入。

Longer page load times lead to higher bounce rates and lower conversion rates. Google have been factoring speed into page rankings since July 2018, and they’ve announced further updates that were scheduled to land in the spring of 2020, but has been postponed to 2021 due to the COVID-19 pandemic.

较长的页面加载时间导致较高的跳出率和较低的转换率 。 自2018年7月以来 ,谷歌一直在考虑提高页面排名的速度,他们已经宣布了计划于2020年Spring发布的更多更新 ,但由于COVID-19大流行而推迟至2021年。

Page load times can be affected by a range of factors, including the device the browser is running on, the network between the browser and the web server, and the design and implementation of the web application that handles the request. While you don’t have control over the browsers and the network, you can optimize your content to work better with challenging environments.

页面加载时间可能受多种因素的影响,包括运行浏览器的设备,浏览器与Web服务器之间的网络以及处理请求的Web应用程序的设计和实现。 尽管您无法控制浏览器和网络,但是您可以优化内容,以在具有挑战性的环境中更好地工作。

Sample page load time broken down by time spent in the browser, transportation over the Internet, and the web application
示例页面加载时间按浏览器,通过Internet传输和Web应用程序花费的时间细分

Web application performance is the sum of the code, the other services it calls such as databases and file systems, the 3rd party dependencies it utilizes, the infrastructure it is deployed on, the network web requests travels over, and the devices that the browsers run on, and the browsers that make the requests. Each one of those parts have the potential to be the weakest chain in the link, and thus the bottleneck that limits the entire performance no matter how well every other link in the chain performs.

Web应用程序的性能是代码,其调用的其他服务(例如数据库和文件系统),其利用的第三方依赖关系,其所部署的基础结构,网络Web请求经过的网络以及浏览器运行的设备的总和。以及发出请求的浏览器。 这些部分中的每个部分都有可能成为链路中最弱的链,因此,无论链中其他所有链路的性能如何, 瓶颈都将限制整个性能。

Example of a browser sending a request to a web server that talks to external services
浏览器向与外部服务对话的Web服务器发送请求的示例
Docker containers Docker容器中运行Web应用程序的两个实例的Web服务器

数据驱动优化 (Data Driven Optimization)

Photo by Agence Olloweb on Unsplash
Agence Olloweb在 Unsplash上的 照片

A very common sunk opportunity cost and cause of unnecessary complexity is premature optimization. Software engineers learn to rely on past experiences to quickly identify solutions to new challenges by pattern matching solutions they’ve come up or used with in the past. That generally works well, except when it comes to solving performance issues; a specific issue that turned out to be the most significant performance bottleneck in one project will not necessarily be a significant contributor in another project.

最常见的沉没机会成本和不必要的复杂性原因是过早的优化 。 软件工程师学会依靠过去的经验,通过他们过去提出或使用过的模式匹配解决方案来快速确定新挑战的解决方案。 除非涉及解决性能问题,否则通常效果很好。 一个特定的问题原来是一个项目中最重要的性能瓶颈,而不一定是另一个项目中的重要因素。

Unfortunately, scaling web applications is not a once-and-done thing.

不幸的是,扩展Web应用程序不是一劳永逸的事情。

Different web sites have different access patterns based on their usage and their visitors. Even the exact same code base and deployment infrastructure may expose different performance bottlenecks based on concrete access patterns and behaviors of visitors — which could change over time.

不同的网站根据其使用情况和访问者具有不同的访问模式。 即使是完全相同的代码库和部署基础结构,也可能会基于具体的访问模式和访问者的行为而暴露出不同的性能瓶颈-这些可能随时间而变化。

In other words, addressing performance issues need to be strictly data driven. Datadog and New Relic are examples of Application Performance Management (APM) services that magically instrument your entire code base, and help identify where the majority of the time was spent while handling requests in your production, staging and other environments; that might be one or more slow database queries, loading files, or time spent in a particular hierarchy of function calls.

换句话说,解决性能问题必须严格由数据驱动。 Datadog和New Relic是应用程序性能管理(APM)服务的示例,可以神奇地检测整个代码库,并帮助确定在生产,暂存和其他环境中处理请求时,大部分时间花在了哪里; 可能是一个或多个缓慢的数据库查询,加载文件或在特定的函数调用层次结构中花费的时间。

Setting up a dashboard on a big screen with real-time, high level indicators of your web site’s performance is a great way to spot unusual behavior at a glance so you can take action to look up the detailed metrics before things spin out of control.

在大屏幕上设置具有实时,高级性能指标的仪表板,是一目了然地发现异常行为的好方法,因此您可以采取措施在失控之前查找详细指标。

Dashboard with key AWS performance indicators
具有关键AWS性能指标的仪表板

高级方法 (High-Level Approach)

Photo by Glenn Carstens-Peters on Unsplash
Glenn Carstens-Peters在 Unsplash上的 照片

The following “flow chart” maps common issues to general tactics that are each worth a book or article in their own right. The list below is by no means exhaustive, and particular circumstances of any specific web application could reasonably dictate other tactics.

以下“流程图”将常见问题映射到一般策略,每种策略本身都值得一本书或一篇文章。 下面的列表绝不是详尽无遗的,任何特定Web应用程序的特定情况都可能合理地指示其他策略。

If you’re using free web application hosting, you’ve probably noticed your application takes seconds to respond. It’s a great way to try out concepts and host portfolio projects, but operating this kind of service is not cheap, so the providers throttle performance and host many applications on a limited infrastructure. When you get serious about growing a web site, you’ll have to pay to play.

如果您使用免费的Web应用程序托管,则可能已经注意到您的应用程序需要几秒钟才能响应。 这是尝试概念和托管项目组合的好方法,但是操作这种服务并不便宜,因此提供商可以限制性能并在有限的基础架构上托管许多应用程序。 当您认真考虑发展网站时,必须付费才能玩。

If monitoring shows

如果监控显示

  • most of the time is spent serving static assets like images, CSS and JavaScript, then move those assets to an edge cached CDN such as CloudFlare or CloudFront, optimize the images for web and performance, and minify static CSS and JavaScript,

    大部分时间都花在服务静态资产(例如图像, CSS和JavaScript)上,然后将这些资源移到边缘缓存的CDN(例如CloudFlare或CloudFront)上 , 针对网络和性能优化图像 ,并最小化静态CSS和JavaScript,

  • most of the time is still spent serving images from the CDN, then lazy load images below-the-fold,

    大部分时间仍然花费从CDN服务的图像,然后延迟加载图像低于所述倍

  • most of the time is spent in database queries, then consider if query results can be cached, and use the query analyzer built into all major databases to understand whether to add indexes, re-arrange inefficient queries or whatever other tactics the query analyzer suggests (PostgreSQL, MySQL, Microsoft SQL Server, Oracle). A common pitfall of developers accessing the database via an ORM (Object Relational Mapping) is inadvertently causing n+1 selects,

    大部分时间都花在数据库查询上,然后考虑是否可以缓存查询结果,并使用所有主要数据库中内置的查询分析器来了解是否添加索引,重新排列低效查询或查询分析器建议的其他任何策略( PostgreSQL , MySQL , Microsoft SQL Server , Oracle )。 开发人员通过ORM(对象关系映射)访问数据库的常见陷阱是无意间导致了n + 1个选择

  • most of the time is spent rendering responses on the server, then check if all or parts of responses can be cached, and examine what is eating up the time — maybe there’s inefficient looping, unused data that could be filtered out and so on,大部分时间都花在了在服务器上呈现响应,然后检查响应的全部或部分是否可以缓存,并检查消耗了什么时间-可能是效率低下的循环,可以过滤掉的未使用数据等等,
  • the disk I/O bandwidth is high, examine if the web server is loading large files, or a lot of files. If those files are passed straight through as responses, consider caching them with a CDN or with a memory cache. If the files are used in computations, consider if some or all of the data can be precomputed and/or cached,

    磁盘I / O带宽高,请检查Web服务器是否正在加载大文件或大量文件。 如果这些文件直接作为响应传递,请考虑使用CDN或内存缓存对其进行缓存。 如果文件用于计算,请考虑是否可以对部分或全部数据进行预计算和/或缓存,

  • most of the time is spent transferring dynamically generated content, or rendering in the browser, then consider lazy loading content below-the-fold,大部分时间都花在传输动态生成的内容或在浏览器中进行渲染,然后考虑延迟加载内容,
  • the CPU load is high, then see if all the time is spent in a particular function. If so, consider the trade-off between refactoring and optimizing (which might not be possible) versus scaling up, or scaling out with a load balancer and multiple parallel instances,

    CPU负载高,然后查看是否所有时间都花在了特定功能上。 如果是这样,请考虑在重构和优化(这可能是不可能的)与按比例扩展或使用负载均衡器和多个并行实例进行横向扩展之间进行权衡,

  • the memory load is high, then check for memory leaks and increase the RAM. In some cases handling big query results may eat up all available memory, or an algorithm may take up more memory than anticipated, in which case the fix is refactoring code, in other cases scaling vertically,

    内存负载高,然后检查内存泄漏并增加RAM 。 在某些情况下,处理大查询结果可能会耗尽所有可用内存,或者算法可能会占用比预期更多的内存,在这种情况下,解决方案是重构代码,在其他情况下,则是纵向扩展,

  • the network latency is the most contributing bottleneck the further browsers are from your web server, then figure out how to run you web servers closer to your users (I’m currently writing a blog post about this), or网络延迟是造成更多浏览器来自Web服务器的最大瓶颈,然后弄清楚如何使Web服务器在用户附近运行(我目前正在撰写有关此内容的博客文章),或者
  • the network latency is the most contributing bottleneck in general, then scaling horizontally or vertically may solve the problem if you’re hosting the web application in the cloud, otherwise you’ll have to figure out how to increase the network bandwidth to the machine that hosts your web application.一般而言,网络延迟是最主要的瓶颈,因此,如果将Web应用程序托管在云中,则水平或垂直缩放可能会解决该问题,否则,您将必须弄清楚如何增加机器的网络带宽托管您的Web应用程序。

循环访问当前最重要的瓶颈 (Iterate on The Currently Most Significant Bottleneck)

Performance metrics output from your APM will likely show the time and percentage spent across the tech stack when serving a particular request.

从APM输出的性能指标可能会显示服务特定请求时在整个技术堆栈上花费的时间和百分比。

You might be tempted to simply work down the ranked list of contributors of a single performance result, but once the most significant bottleneck has been addressed, there’s a good chance the next most significant bottleneck will turn out to be something different than the one that was ranked second in the first metrics output.

您可能很想简单地计算单个绩效结果的贡献者排名,但是一旦解决了最重要的瓶颈,很有可能下一个最重要的瓶颈将与以前的瓶颈有所不同。在第一个指标输出中排名第二。

If your web application is deployed to a cloud Platform as a Service (PaaS) or Infrastructure as a Service (IaaS), then beware you local development environment will likely not be a good place to evaluate performance.

如果将Web应用程序部署到云即服务(PaaS)或基础架构即服务(IaaS) ,则请注意本地开发环境可能不是评估性能的好地方。

绩效策略的堆栈排名 (Stack Ranking of Performance Tactics)

Photo by Eaters Collective on Unsplash
Eaters Collective在 Unsplash上 拍摄的照片

Here’s my highly opinionated stack-ranked list of general performance tactics. I’m well aware particular circumstances can throw this upside down, but in my 30+ years of building enterprise applications, web applications, and odds and bits in-between, this is what I generally consider when thinking about scalability.

这是我对通用性能策略高度评价的堆栈排名列表。 我很清楚特定的情况会导致这种情况倒挂,但是在我构建企业应用程序,Web应用程序以及介于两者之间的30多年的岁月中,这是我在考虑可伸缩性时通常会考虑的问题。

My ranking is broadly based on impact versus cost and effort. In that sense, the best tactics are the ones with the highest impact and lowest cost/effort. It’s often relatively easy to identify and stay away from low impact and high cost/effort tactics, but low impact and low cost/effort can be tempting because the cost/effort is low, so what’s the harm? Opportunity cost. Hunter Walk calls this snacking.

我的排名大致基于影响与成本和努力的对比。 从这个意义上讲,最好的策略是影响最大,成本/工作量最小的策略。 通常比较容易识别并远离低影响和高成本/努力策略,但是低影响和低成本/努力可能很诱人,因为成本/努力低,那么有什么危害呢? 机会成本。 猎人街称之为零食

Des Traynor’s blog post Des Traynor的博客文章 The first rule of prioritization: No snacking 优先顺序的第一条规则:零食

通常很重要的可伸缩性策略 (Scalability Tactics that Often Matter)

The tactics in this cohort are fairly low effort and often have a high impact since assets like video, images, CSS, and JavaScript are usually some of the biggest responses returned to web browsers.

该群组的策略工作量很小,并且通常会产生很大的影响,因为视频,图像,CSS和JavaScript之类的资产通常是返回给Web浏览器的最大响应。

  • Scale images to intended display resolutions and compress them. This is particularly important for mobile devices; they are often on slower networks, have less RAM and less CPU power to process incoming data, thus resulting in a slower experience.将图像缩放到预期的显示分辨率并压缩它们。 这对于移动设备尤为重要。 它们通常位于速度较慢的网络上,具有较少的RAM和较少的CPU能力来处理传入的数据,因此会导致速度较慢。
  • Serve static assets via a CDN. The major cloud service providers all offer CDN solutions like AWS CloudFront, GCP Cloud CDN, and Azure CDN. If you’re not deploying to the cloud, CloudFlare has your back.

    通过CDN服务静态资产。 所有主要的云服务提供商都提供CDN解决方案,例如AWS CloudFront , GCP Cloud CDN和Azure CDN 。 如果您没有部署到云, CloudFlare会为您服务。

  • Scale the web server hosts vertically and horizontally to a size where CPU, memory, and network bandwith is not the limiting factor. This is easy to test if you’re deploying to the cloud: start with a small instance type and see if the response time drops when you add more instances. Whenever CPU or memory runs high, or the maximum requests handled per second plateaus, bump the instance type and go back to one instance, then repeat the process. AWS often ties network and I/O bandwidth to the instance size.将Web服务器主机垂直和水平扩展到CPU,内存和网络带宽不是限制因素的大小。 这很容易测试是否要部署到云中:从小实例类型开始,看看添加更多实例时响应时间是否减少。 每当CPU或内存耗尽或每秒处理的最大请求数量稳定时,请提高实例类型并返回到一个实例,然后重复该过程。 AWS通常将网络和I / O带宽与实例大小联系在一起。
  • Lazy load assets below-the-fold.懒惰的负载资产低于正常水平。

有时很重要的可伸缩性策略 (Scalability Tactics That Sometimes Matter)

The tactics in this cohort are commonly ones developers think of first without data to pinpoint performance bottlenecks, they are often high effort, and could very well have low impact when done on a hunch.

该队列中的策略通常是开发人员首先想到的没有数据以查明性能瓶颈的策略,它们通常是费力的,并且在预感中影响很小。

  • Minify and only include JavaScript and CSS that are needed for the particular page shown. This is relatively straightforward to do using Webpack code splitting on Node.js projects, controller specific assets in Ruby on Rails projects, Flask-Assets on Python and Flask projects, and ASP.NET.

    缩小并仅包括所示特定页面所需JavaScript和CSS。 在Node.js项目上使用Webpack代码拆分 ,在Ruby on Rails项目中使用控制器特定的资产 ,在Python和Flask项目上使用 Flask-Assets以及ASP.NET ,这相对容易做到。

  • Cache common file reads, queries, computations and renders (but beware cache invalidation is hard).

    缓存公用文件的读取,查询,计算和渲染(但要注意, 缓存失效很困难)。

  • Prevent unnecessary re-renders of big and complex single-page application (SPA) pages.

    防止不必要地重新呈现大型和复杂的单页应用程序(SPA)页面。

  • Optimize database queries.

    优化数据库查询 。

  • Reduce broadsides of AJAX requests from Single Page Applications (SPA), because many requests in a row will get queued either by the browser or the server.

    减少来自单页应用程序 (SPA)的AJAX请求的多面性,因为连续的许多请求将被浏览器或服务器排队。

  • Lazy load contents below-the-fold (straightforward for SPAs, not trivial for server-side rendered pages).

    延迟加载内容(低于SPA)(对于SPA来说是直接的,对于服务器端呈现的页面而言则不重要)。

  • Optimize data structures.优化数据结构。
  • Move logic that doesn’t need to be run synchronously to asynchronous workers. At scale, an Event-Driven Architecture might be a good fit.

    将不需要同步运行的逻辑移到异步工作器。 从规模上讲, 事件驱动的体系结构可能是一个很好的选择。

  • Run web servers geographically close to your visitors.在地理位置上靠近您的访客运行Web服务器。
  • Optimize algorithms.优化算法。

非常重要的可伸缩性策略 (Scalability Tactics That Rarely Matter)

I have a very pragmatic view of technologies. When applied thoughtfully, one technology may have a number of advantages over another in a particular situation, but I’ve rarely seen raw performance come up as a key deciding point when choosing between similar technologies.

我对技术有非常务实的看法。 如果经过深思熟虑地应用,在特定情况下,一种技术可能会比另一种技术具有许多优势,但是我很少看到原始性能是在类似技术之间进行选择的关键决定点。

Of course there are outliers, like preparing an online ticket system to handle Beyoncé opening up ticket sales for 5 concerts at a 70,000 seat stadium at noon, July 1st.

当然,有些离群值,例如准备在线票务系统来处理碧昂丝在7月1日中午在70,000个座位的体育场开放5场音乐会的门票销售的情况。

  • SQL vs. NoSQL

    SQL与NoSQL

  • Redis vs. Memcached vs. other caching technologies.

    Redis与Memcached与其他缓存技术。

  • AWS vs. GCP vs. Azure vs. Oracle Cloud Infrastructure vs. other cloud platforms.

    AWS , GCP , Azure , Oracle云基础架构 ,其他云平台。

  • Express vs. Flask vs. Rails vs. Grails vs. Spring vs. .NET vs. other web application frameworks.

    Express , Flask , Rails , Grails , Spring , .NET和其他Web应用程序框架。

  • React vs. Angular vs. Vue vs. Polymer vs. Elm vs. other front-end libraries and frameworks.

    React , Angular , Vue , Polymer , Elm ,其他前端库和框架。

  • JavaScript vs. Python vs. Ruby vs. Go vs. C# vs. Java vs. Rust vs. other languages.

    JavaScript , Python , Ruby , Go , C# , Java , Rust和其他语言。

  • MVC vs. MVVM vs. MVP vs. other architectural patterns.

    MVC与MVVM , MVP与其他架构模式。

升级并防止性能下降 (Level Up and Prevent Performance Regression)

Photo by Steven Lelham on Unsplash
史蒂文·莱勒姆 ( Steven Lelham)在 Unsplash上 拍摄的照片

Once you’ve got detailed performance metrics in place and the team has become used to applying data driven optimization, it is time to level up and prevent performance regression hitting production.

一旦有了详细的性能指标,并且该团队已习惯于应用数据驱动的优化,就可以升级并防止性能下降影响生产了。

The approach is straightforward: Set response time goals for all pages that contribute to revenue and add tests to your continuous integration/continuous deployment (CI/CD) pipeline to automatically fail builds that cause performance regression.

该方法很简单:为所有有助于收入的页面设置响应时间目标,并向持续集成/持续部署 (CI / CD)管道添加测试,以自动使导致性能下降的构建失败。

This can be achieved by testing for response times in integration tests, integrating Google Chrome Lighthouse, or using other third party services that test response times.

这可以通过在集成测试中测试响应时间,集成Google Chrome Lighthouse或使用其他测试响应时间的第三方服务来实现。

升级并保持增长 (Level Up and Stay Ahead of Growth)

When your site has been growing for a while, revenue is going up, and you begin to worry about hockey stick growth and peak demand, it is time to think about load testing.

当您的网站发展了一段时间之后,收入不断增加,并且您开始担心曲棍球棒的增长和需求高峰时,就该考虑进行负载测试了 。

Load testing is about simulating realistic user behaviors such as customers browsing the site, putting items in the cart, creating accounts, and checking out. You’ll know from your analytics what the frequency and ratio is for each of these actions. Model user behaviors in tools like Locust or Apache JMeter, then watch how your application performs as you ramp up above your current level of user interactions.

负载测试是关于模拟现实的用户行为,例如客户浏览网站,将商品放入购物车,创建帐户并进行结帐。 通过分析,您将知道这些操作的频率和比率。 在Locust或Apache JMeter之类的工具中对用户行为进行建模,然后观察您的应用程序在逐渐超过当前用户交互级别时的性能。

If you understand how your users are behaving on your web site, then load testing will help you expose the next weakest link when traffic grows. However, growth might come from a cohort that doesn’t behave like existing customers. Oh well, as your sophistication grows, the complexity grows as well…

如果您了解用户在网站上的行为,那么负载测试将帮助您在流量增长时暴露出下一个最弱的链接。 但是,增长可能来自一群不像现有客户那样的人。 哦,随着您的复杂程度的提高,复杂性也随之提高……

结论 (Conclusion)

Denys Nevozhai on Denys Nevozhai摄于 Unsplash Unsplash

Scaling web applications is much less an art when tactics are driven by data than hunches. Measure thrice and cut once is a sage advice that also applies to how to focus efforts on optimizing the performance of your web application.

当策略由数据驱动时,扩展Web应用程序不是一门艺术,而是预感。 三次测量和一次剪切是一个明智的建议,该建议也适用于如何集中精力优化Web应用程序的性能。

Set page load thresholds, test against those in your CI/CD pipeline, and you’ll be able free up time building new features without worrying about breaking performance and page ranking.

设置页面加载阈值,针对CI / CD管道中的阈值进行测试,您将可以腾出时间来构建新功能,而不必担心会破坏性能和页面排名。

Model known user behavior and stay ahead of growth with load testing.

对已知的用户行为进行建模,并通过负载测试保持领先。

Want to learn more details? Here are some great resources:

想了解更多细节? 这里有一些很棒的资源:

  • web.dev

    web.dev

  • Dropbox blog post

    Dropbox博客文章

  • Auth0 blog post

    Auth0博客文章

  • Stackify blog post

    Stackify博客文章

We welcome thoughts, comments and counterpoints to help us learn, evolve and grow. Participate and let us know what you think!

我们欢迎各种想法,评论和对策,以帮助我们学习,发展和成长。 参与并让我们知道您的想法!

Please take a look at our careers page if you found this interesting and would like to come help us build, and scale our software for the future.

如果您发现这很有趣,请查看我们的职业页面 ,并希望能帮助我们为将来构建和扩展我们的软件。

A big shout out to Stephanie Cheney and Sophie Parker for very helpful feedback!

非常感谢斯蒂芬妮·切尼 ( Stephanie Cheney)和索菲·帕克(Sophie Parker),以获取非常有用的反馈!

翻译自: https://medium.com/fernish-tech/how-to-scale-a-web-application-f1250a9dbf59


http://www.taodudu.cc/news/show-5884123.html

相关文章:

  • 初创公司怎么做销售数据分析_我在数据科学初创公司实习的第一周
  • 英超:热刺2-1逆转布莱顿 凯恩补射扳平阿里破门反超
  • jboss esb_与JBoss ESB和LegStar的大型机集成
  • 三星 Galaxy Tab A8 平板 评测
  • 儒豹公布2009年2月热门搜索关键词排行榜
  • 华为手机年轻化转型初见成效,《梦想的声音》传递了哪些讯号?
  • 儒豹公布2009年4月手机搜索热门关键词排行榜
  • 手机搜索公司公布2008年10月份热搜词
  • 手机搜索11月份热搜排行
  • 儒豹牛年元月手机搜索关键词
  • 手机WiFi万能钥匙查看破解的密码和手机查询命令收集
  • 手机WiFi万能钥匙查看破解的password和手机查询命令收集
  • 01 HTML、HTTP协议
  • 前端初级知识点1
  • 黑马程序员Java零基础视频教程_上部(P1-P80)
  • 网上下载论文时,如何转换成常用的word文档?
  • Java数字金额大写转换
  • 【转载】 -- 15条使人醒悟的生活中的定律
  • 行政大厅导航软件-无需安装APP的手机室内导航软件介绍
  • 再谈1
  • Mysql:索引、事务
  • TomcatJSON parse error: Invalid UTF-8 解决办法
  • 请教一下,用R语音跑大数据,程序报错,不知道错在哪里
  • R编程Error处理手册
  • R:报错“Error in gzfile(file, “wb“) : 无法打开链结”,“‘x‘ must be numeric”及中文路径下利用dev.new()绘图
  • R语言 mice包 Error in terms.formula(tmp, simplify = TRUE) : ExtractVars里的模型公式不对
  • 解决R语言xlsx安装遇到加载rjava报错的问题
  • R语言 cannot open the connection 的解决办法
  • Flume启动错误之:Bootstrap Servers must be specified
  • Error:stack overflow分析

如何扩展Web应用程序相关推荐

  1. 关于更新 Web 应用程序 URL 和 IIS 绑定

    (转:msdn) 与典型的 IIS Web 应用程序不同,您不能仅使用 IIS 管理器或其他 IIS 元数据库工具来修改已使用 Windows SharePoint Services 3.0 扩展的 ...

  2. java 图片放在哪_在Java Web应用程序中,应该将用户照片存储在哪里?

    小编典典 解决方案前要考虑的事项: 您是否会水平扩展Web应用程序(即,您是否正在运行多个servlet容器实例). 您期望什么样的流量? 图片需要更新的速度(即用户更改了头像后,他们和所有其他用户是 ...

  3. 转载:用 Tomcat 和 Eclipse 开发 Web 应用程序

    原文地址:http://www.ibm.com/developerworks/cn/opensource/os-eclipse-tomcat/ 所需的组件 Eclipse V3.2 Callisto ...

  4. 最好的10个移动 Web 应用程序开发框架

    在近期几年里,移动互联网快速发展.市场潜力巨大. 继计算机.互联网之后,移动互联网正掀起第三次信息技术革命的浪潮,新技术.新应用不断涌现.今天这篇文章向大家推荐10大优秀的移动Web开发框架.帮助开发 ...

  5. 如何使用Ajax技术开发Web应用程序(2)

    在上一篇文章中,我们讨论了如何通过javascript从一个远程XML文件中取得数据.在这篇文章中,我们将学会怎样对数据作更复杂的处理.作为一个示例,我们会准备一组XML数据,将数据分割成独立的片断并 ...

  6. python运行文件后缀_Python程序存储成以.py为扩展名的程序文件用Python解释器执行。(4.5分)_学小易找答案...

    [简答题]简述助跑的两种起动方式? [填空题]在跳远技术的发展过程中,曾经出现过 . . .等3中姿势. [判断题]一般情况下,Python语言中使用符号#表示程序中的注释.(4.5分) [论述题]请 ...

  7. Web应用程序指纹识别工具BlindElephant

    Web应用程序指纹识别工具BlindElephant BlindElephant是一款Web应用程序指纹识别工具.该工具可以读取目标网站的特定静态文件,计算其对应的哈希值,然后和预先计算出的哈希值做对 ...

  8. ScriptManager 帮助您实现 Web 应用程序的 AJAX 功能

    本文讨论: ScriptManager 在 ASP.NET AJAX 中的作用 ScriptManager 的隐式使用和显式使用 ASP.NET AJAX 对 Web 服务的支持 ASP.NET AJ ...

  9. 可扩展Web架构与分布式系统

    1.1. web分布式系统的设计原则 搭建和运营一个可伸缩的web站点或者应用程序意味着什么?在原始层面上这仅仅是用户通过互联网连接到远程资源-使系统变得可伸缩的部分是将资源.或者访问的资源,分布于多 ...

最新文章

  1. JAVA_OA(十四):SSM练手项目bug-Oracle分页web页面无法转到下一页
  2. NIO 之 Channel
  3. P2519-[HAOI2011]problem a【dp】
  4. Redis集群添加节点
  5. Oracle中关于并集/交集/差集的运算
  6. 大手笔!EDG夺冠TCL奖励300万,还送全系AI家电一套
  7. Git生成ssh密钥指定文件
  8. java 选择图片 显示不出来的_JAVA 窗体选择图片显示在窗体中
  9. c++ 一维高斯拟合_χ2检验教案:拟合度检验与正态分布的关系
  10. 安全双标准或成拖垮企网防护的新威胁
  11. 51nod 1605:棋盘问题
  12. vs2010使用教程c语言编程,VS2010的使用
  13. 服务器每个月维护要1000元,5月24日服务器例行维护公告(已完成)
  14. 从30天到1天,专业视频制作背后的技术探索之路
  15. 计算机键盘上的tab键是什么键,电脑Tab键有什么用处
  16. MATLAB绘制二元函数图像
  17. uniapp的分享到朋友圈和朋友(APP)
  18. openCV+VS2010结合+正确运行图片
  19. 删除末尾带.的文件夹
  20. C/C++的内存分配?栈和堆的区别?为什么栈快?

热门文章

  1. 一班洽谈框架细化_理解层次:框架细化篇(以供参悟)
  2. 【.Net Core】把dotnet core 项目部署到docker
  3. java 中缀转后缀_java实现 中缀转后缀
  4. python中的map函数
  5. Swift 开源项目精选 - 应用架构角度
  6. 文本文件(ASCII)的读写
  7. 假设检验 | 非参数假设检验 —— KS检验
  8. PopupMenu样式修改
  9. GB/T 4768防霉包装
  10. windows子系统Ubuntu18.04LTS换源及配置grpc编译环境