TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ruby on Rails load testing habits

128 点作者 a12b超过 1 年前

8 条评论

rdoherty超过 1 年前
These are great tips for load testing any web service. Don&#x27;t forget that you can also saturate memory, disk or network too, so watch those graphs too. I&#x27;ve seen load tests unable to saturate CPU because another resource was limited.<p>Also don&#x27;t forget that you are load testing all the dependencies of your service. Database, caching tier, external services, etc. Make sure other teams are aware!<p>Also nothing beats real world traffic. Users&#x27; connections will stay open longer than a synthetic tool may hold them open due to bandwidth, they make very random, sporadic requests too. Your service will behave very differently under large amounts of real world traffic vs synthetic.<p>Other options if you are running multiple web servers is to shift traffic around to increase traffic to 1 host and see where it fails. That is usually a very reliable signal for peak load.<p>And don&#x27;t forget to do this on a schedule as your codebase (and your dependencies codebases) changes!
评论 #39147639 未加载
mplewis超过 1 年前
If you&#x27;re looking to run programmable load test scenarios as described in this blog post, consider checking out <a href="https:&#x2F;&#x2F;k6.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;k6.io&#x2F;</a>, which I&#x27;ve found to be extremely easy to use and powerful.
anonacct37超过 1 年前
&gt; My initial requirement was to send requests with unique parameters. To the best of my knowledge, no tool could do this.<p>wrk does this with lua. <a href="https:&#x2F;&#x2F;github.com&#x2F;wg&#x2F;wrk&#x2F;blob&#x2F;master&#x2F;src&#x2F;wrk.lua">https:&#x2F;&#x2F;github.com&#x2F;wg&#x2F;wrk&#x2F;blob&#x2F;master&#x2F;src&#x2F;wrk.lua</a><p>Also even things like the venerable jmeter supported pulling parameters from a csv file.
评论 #39138096 未加载
ericb超过 1 年前
If you&#x27;d like to write your load tests in Ruby (plain ruby or browser based), and use your own libraries (internal libraries, specs, ets) browserup does that:<p>Ruby with browser:<p><a href="https:&#x2F;&#x2F;browserup.com&#x2F;docs&#x2F;en&#x2F;load&#x2F;ruby-load-test.html" rel="nofollow">https:&#x2F;&#x2F;browserup.com&#x2F;docs&#x2F;en&#x2F;load&#x2F;ruby-load-test.html</a><p>Command-line installation:<p><a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;browserup" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;browserup</a>
pistoriusp超过 1 年前
Having your test database mirror production as closely as possible is also an important habit, however I’m biased since that’s part of the offering that I’m building.
评论 #39142056 未加载
Hendrikto超过 1 年前
&gt; If the application can’t saturate the CPU, there’s a fundamental problem. It’s a shame because it makes adding more servers less efficient. Money is being wasted on hosting costs, and this should be a priority to address.<p>Talking about efficiency being a priority, but using RoR. I guess that is one way of saturating the CPU.
评论 #39142167 未加载
评论 #39139643 未加载
评论 #39139741 未加载
评论 #39139936 未加载
sfc32超过 1 年前
RoRvsWild is a pretty cool product, and built by 2 of the nicest guys in the Ruby ecosystem.
评论 #39143850 未加载
rubyissimo超过 1 年前
fwiw, I know it&#x27;s the right thing to run tests from a different computer. But it&#x27;s more annoying. And I hereby tell you that 90% of the time it probably doesn&#x27;t matter.<p>Definitely times it isn&#x27;t true. But if you&#x27;re not doing a load test bc it&#x27;s a pita, do it locally. Most of the time I&#x27;ve wanted to do this, all the action is inside the app. Just be careful to acknowledge that there could be limitations &#x2F; surprises.