Rails 3 app for measuring stability under high loads

Hi, I'm a new programmer, and I was working on my first real application, which I am going to launch in the coming weeks. The app uses some neat ideas when sharing photos, but basically it's just a web-based photo sharing application. I would like information on what types of loads 3 small rails can handle, but I'm not sure where to start. Do I need to run tests for testing to find out how many requests it can handle and how fast it does? How to find such statistics for your application?

In the end, I would like to know about the maximum amount of traffic that the site can handle, or someday to cope in order to drive crazy what I work with. I would not want to launch a viral marketing campaign if the site could not handle several hundred concurrent requests. I’m not trying to jump from a pistol and get ready for a ton of traffic that I don’t have yet, but I really would like to have some understanding and idea of ​​where to go next in terms of how convenient and scalable my expression is.

Thanks a lot!

+6
source share
3 answers

The bigger question is where do you deploy your application:

I host part of my linode instance using nginx / unicorn. It is much more work, but I like it. I don’t load the load testing much, but sometimes I hit the home pages hard with Siege (you can install it with homebrew, brew install siege ) to understand what I'm working with.

While it comes to deployment, I think that getting paid hosting from Heroku would remove some of your concerns about stability, setting up the application to withstand heavy loads.

Can you provide us with additional information about choosing a hosting?

+4
source

"what type of load can the xxxx application handle"

You're right. To answer this, we are testing!

Without testing, we cannot just say something as broad as our ruby ​​application, running on 2 dynamoks from Heroku, can handle 100 requests / sec or 100 simultaneous users. We need to check. Scaling can also be tricky. Without testing, we will not know which components scale well and which do not.

To get started, we have our application, the system under test. We already work for Heroku, which gives us immediate access to New Relic . We could try including the free version of New Relic to find out what information it gives us. There is also a paid version that we could try during our “tuning sessions” if we need to dive even more.

Then we just do not have enough “driver”, a process that will load the load on the application using the most common process flows (loading images, viewing images, logging in to the system, etc.).

To get started, we just need 1-N of our closest friends who would like to act as users on our site while we monitor all activities from New Relic. Measuring response time for user experience, defining slow requests, see where our application spends its time.

When we get tired of buying all our beer for our friends to help us, we can look at automating some common business flows using a load testing tool. There are commercial ones: Mercury LoadRunner, Borland SilkPerformer and Microsoft Team Test.

We could also get creative using functional testing tools like Watir or Selenium, or even trusted wget or curl to manage the load.

We can use our laptops or Amazon EC2 as download agents that will generate user traffic on the site by running our scripts.

It should not be as complicated as all this, although testing is usually a spiral in a quagmire, if we are not careful to make sure that we are testing the correct flows and, perhaps, just as important, measuring our application. Without measurements, we won’t know if code or configuration changes have changed, improved or worsened the situation.

Disclaimer: I never had a Rails application for production, but if I did, I would use New Relic to monitor it. At least for a start, especially since we are already on Herek.

+1
source

I have not tried it yet, but I heard about:

http://blitz.io/

Looks good and is supported by Heroku through Add-On

+1
source

Source: https://habr.com/ru/post/897861/


All Articles