Weird performance of a rails + sinatra app

I have a rails application and a Sinatra application. The Sinatra application is written to do lookup timezone based on either ZIP or IP. Sinatra application uses geoip_city gem for lookup using IP and has its own database for ZIP lookup. The rails app talks to the Sinatra application for timezone lookup.

We worked on rails application's performance and have improved it to a good extent. We tested it using Jmeter, with 1000 threads running forever with 60 ramp-up. It performed well. We also tested the Sinatra app with similar numbers and it is performing well enough. However, when we test the piece where rails app talks to Sinatra app for the timezone lookup, after ramp up period, we get timeout errors. The timezone lookup request made by the rails app to the Sinatra app times out. If I reduce number of threads in Jmeter to 100, the application performs fine.

I wonder why this happens if rails app and Sinatra application are performing fine individually. What is it that reduces the performance when rails and Sinatra application are chained together. Is it how it is supposed to be?


As @troelskn has rightly pointed out in the comment, both the applications were competing for resources. Moving one of them to a different server with dedicated resources seems to have solved the problem.

Need Your Help

MediaMuxer unable to make MP4s that are streamable

android video mediamuxer mediaextractor

I'm editing an MP4 on Android using MediaExtractor to fetch audio and video tracks then creating a new file using MediaMuxer. It works fine. I can play the new MP4 on the phone (and other players) ...

OleDbAdapter is not recognizing '@' in query

c# oledb

The following code is used to read data from excel into a gridview.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.