Phusion Passenger 4.0.20 released
Phusion Passenger is a fast and robust web server and application server for Ruby, Python and Node.js. It works by integrating into Apache and Nginx and turning them into a fully-featured application server. It has high-profile users such as New York Times, AirBnB, Juniper, Motorola, etc, and comes with many features that make your life easier and your application perform better.
Phusion Passenger is under constant maintenance and development. Version 4.0.20 is a bugfix release.
Phusion Passenger also has an Enterprise version which comes with a wide array of additional features. By buying Phusion Passenger Enterprise you will directly sponsor the development of the open source version.
Recent changes
- Fixed a bug in Phusion Passenger Standalone’s daemon mode. When in daemon mode, the Nginx temporary directory was deleted prematurely, causing some POST requests to fail. This was a regression that was introduced in 4.0.15 as part of an optimization.
- Fixed compilation problems on Solaris 10 with Sun Studio 12.3.
- Improved detection of RVM problems.
- It is now possible to log the request method to Union Station.
- Introduced a new option, `PassengerLoadShellEnvvars` (Apache) and `passenger_load_shell_envvars` (Nginx). This allows enabling or disabling the loading of bashrc before spawning the application.
- [Enterprise] Fixed a packaging problem which caused the flying-passenger executable not to be properly included in the bin path.
- [Enterprise] Fixed a race condition which sometimes causes the Flying Passenger socket to be deleted after a restart. Fixes issue #939.
- [Enterprise] The `byebug` gem is now supported for debugging on Ruby 2.0. The byebug gem requires a patch before this works.
Installing or upgrading to 4.0.20
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Final
Phusion Passenger’s core is open source. Please fork or watch us on Github. đ
If you would like to stay up to date with Phusion news, please fill in your name and email address below and sign up for our newsletter. We won’t spam you, we promise.
Phusion Passenger 3.0.8 released
Phusion Passenger is an Apache and Nginx module for deploying Ruby web applications. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since version 3.0 it can also run standalone without an external web server, making it not only easier for first-time users but also ideal on development environments.
Recent changes
Phusion Passenger is under constant maintenance and development. We are pleased to announce Phusion Passenger version 3.0.8. This is a bug fix release.
- [Nginx] Upgraded preferred Nginx version to 1.0.5.
- [Nginx] Fixed various compilation problems on various platforms.
- [Nginx] We now ensure that SERVER_NAME is equal to HTTP_HOST without the port part.
This is needed for Rack compliance. By default Nginx sets SERVER_NAME to whatever is specified in the server_name directive, but that’s not necessarily the correct value. This fixes, for example, the use of the ‘map’ statement in config.ru. - [Nginx] Added the options passenger_buffer_size, passenger_buffers and passenger_busy_buffers_size.
These options are similar to proxy_module’s similarly named options. You can use these to e.g. increase the maximum header size limit. - [Nginx] passenger_pre_start now supports virtual hosts that listen on Unix domain sockets.
- [Apache] Fixed the pcre.h compilation problem.
- [Standalone] Fixed ‘passenger stop’.
It didn’t work properly because it kept waiting for ‘tail’ to exit. We now properly terminate ‘tail’ as well. - Fixed compatibility with Rake 0.9.
- Fixed various Ruby 1.9 compatibility issues.
- Various documentation improvements.
- New Union Station filter language features.
It now supports status codes and response times. Please refer to https://engage.unionstationapp.com/help#filtering for more information.
How do I upgrade to 3.0.8?
Via a gem
First install the gem with the following command:
gem install passenger
If you’re using Phusion Passenger for Apache or for Nginx, then re-run the Apache or Nginx module installer, whichever is appropriate:
passenger-install-apache2-module passenger-install-nginx-module
At the end the installer will tell you to paste a configuration snippet into your web server config file. Replace the old snippet that you already had with this new one.
Phusion Passenger Standalone users don’t need to run anything else. Whenever you type
passenger start
it will automatically upgrade itself.
Via Ubuntu packages
John Leach from Brightbox has kindly provided Ubuntu packages for Phusion Passenger. The package is available from the Brightbox repository which you can find at:
http://apt.brightbox.net
Add the following line to the Third Party Software Sources:
deb http://apt.brightbox.net hardy main
(The simplest way to do that is to create a file in /etc/apt/sources.list.d/ containing the deb instruction, and then run ‘apt-get update’).
Once youâve done this then you can install Phusion Passenger by running:
sudo apt-get install libapache2-mod-passenger
-or-
sudo apt-get install nginx-brightbox
(Note that John is currently packaging 3.0.8, so it might take a while before this release shows up in the apt repository.)
Via RedHat/CentOS packages
YUM repositories with RPMs are maintained by Erik Ogan and Stealthy Monkeys Consulting. Please note that Erik is currently packaging 3.0.8, so it might take a while before this release shows up in the yum repositories.
Step 1: install the release package
The easiest way to install Phusion Passenger and keep it up to date is to install the passenger-release package from the main repository:
Fedora Core 14:
rpm -Uvh http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm
Fedora Core 13:
rpm -Uvh http://passenger.stealthymonkeys.com/fedora/13/passenger-release.noarch.rpm
RHEL 5 / CentOS 5 / ScientificLinux 5:
(Note: these packages depend on EPEL.)
rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
RHEL 6 / CentOS 6 / ScientificLinux 6:
These packages will be available as soon as there is a stable beta of either CentOS 6 or SL 6 to use as a build platform.
Step 2: use Yum
From there you can use Yum to install packages. For example, try one of these:
yum install nginx-passenger
or
yum install mod_passenger
or
yum install passenger-standalone
Building your own packages
There are instructions for building your own packages and Yum repositories in the rpm directory ReadMe within the GitHub repository.
Final
Phusion Passenger is provided to the community for free. If you like Phusion Passenger, please consider sending us a donation. Thank you!
Starting Union Station beta phase 2, reopening registrations
Union Station is our state-of-the-art web application performance monitoring and behavior analysis service. It is currently in public beta, which started on March 2. You can follow us on Twitter through @unionstationapp.
We’ve been in beta for little over a month now, and during that period in time, we’ve been fortunate enough to have been able to receive a lot of valuable feedback from our beta testers. As of today we are entering the next phase of the beta. Previous beta accounts have been removed, and all people are once again given a chance again to register. This is necessary due to some changes we’ve made to the terms of service (in particular the ability for beta testers to opt-in for announcements like these via email pertaining to Union Station) as well as a new offering in plans. Like last time there is a registration limit.
During the last beta a number of people have requested an account. These people were put on a waiting list. When the registration limit has been reached we’ll manually register as many people on this waiting list, as well as people who have given us feedback during the first beta, as we can.
Please note that the Terms of Service are still a work in progress and may be subject to changes in the near future, and that Union Station is still in beta.
New account plans
After having gained a better idea of our resource requirements we have been working on refining our offerings accordingly. In particular, we’ve decided to deprecate the Hobby plan in favor of buffing up the Startup plan in terms of retention time by doubling it from 7 to 14 days.
In place of the Hobby plan, we’ve introduced the Jumbo plan for the medium to large-sized sites, which allows up to 8 nodes.
Plans are still subject to change as we’re still in beta, but we believe we’ve found a much better balance with this new offering in terms of features and pricing.
Larger data retention time during the new beta
During the previous beta we capped data retention times for all plans to 7 days. During this phase of the beta however, we’re going to attempt to double that data retention time to 14 days to see how all the back-end changes hold up in the current situation.
UI polishes, bug fixes and features
We’ve fixed many of the bugs and UI quirks that users have reported. Some of the most important UI polishes and new features that we’ve introduced include:
- HTTP response status codes are now logged as well. This requires Phusion Passenger 3.0.7 or later. The user interface highlights the requests for which the status code is not successful (i.e. in the 4xx-5xx range).
- Requests with exceptions are now highlighted.
- Requests now display all associated exceptions in a tab.
- The Union Station filter language has been further improved.
- Time range and active tab information are now saved. Previously, changing the tab would reset the viewed time range to the default value of “Past 30 minutes”. Clicking on another node would reset the active tab back to “Analysis”. The UI now remembers which time range you’ve chosen and which tab was active.
- The ‘throughput’ chart has been revamped. It previously displayed requests per hour, but due to many reports about the unintuitiveness of the chart we’ve now changed it to display requests per minute.
- We now work well with different time zones. We used to try to autodetect the user’s browser time zone through Javascript but this has proven to be far less reliable than we hoped it would be. We now store time zone information on the server and recalculate all dates according to the user’s preferred time zone. You can change your time zone on your user profile page.
- Authorizing another user now works as expected. Previously when you wanted to authorize another person to view the data for your web app, that person must first register a Viewer account after which you can authorize his email address. This was a bit cumbersome and we’ve now streamlined the process by automatically sending that person an invitation email which allows him to sign up for a Viewer account immediately.
Phusion Passenger 3.0.7 released with support for Nginx 1.0.0
Phusion Passenger is an Apache and Nginx module for deploying Ruby web applications. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since version 3.0 it can also run standalone without an external web server, making it not only easier for first-time users but also ideal on development environments.
Recent changes
Phusion Passenger is under constant maintenance and development. We are pleased to announce Phusion Passenger version 3.0.7. This is a bug fix release.
- Fixed a bug passenger-install-apache2-module. It could crash on some systems due to a typo in the code.
- Upgraded preferred Nginx version to 1.0.0.
- Phusion Passenger Standalone now pre-starts application processes at startup instead of doing that at the first request.
- When sending data to Union Station, the HTTP status code is now also logged.
- Various Union Station-related stability improvements.
- The Linux OOM killer was previously erroneously disabled for all Phusion Passenger processes, including application processes. The intention was to only disable it for the Watchdog. This has been fixed, and the Watchdog is now the only process for which the OOM killer is disabled.
- Fixed some compilation problems on OpenBSD.
- Due to a typo, the dependency on file-tail was not entirely removed in 3.0.6. This has now been fixed.
How do I upgrade to 3.0.7?
Via a gem
First install the gem with the following command:
gem install passenger
If you’re using Phusion Passenger for Apache or for Nginx, then re-run the Apache or Nginx module installer, whichever is appropriate:
passenger-install-apache2-module passenger-install-nginx-module
At the end the installer will tell you to paste a configuration snippet into your web server config file. Replace the old snippet that you already had with this new one.
Phusion Passenger Standalone users don’t need to run anything else. Whenever you type
passenger start
it will automatically upgrade itself.
Via Ubuntu packages
John Leach from Brightbox has kindly provided Ubuntu packages for Phusion Passenger. The package is available from the Brightbox repository which you can find at:
http://apt.brightbox.net
Add the following line to the Third Party Software Sources:
deb http://apt.brightbox.net hardy main
(The simplest way to do that is to create a file in /etc/apt/sources.list.d/ containing the deb instruction, and then run ‘apt-get update’).
Once youâve done this then you can install Phusion Passenger by running:
sudo apt-get install libapache2-mod-passenger
-or-
sudo apt-get install nginx-brightbox
(Note that John is currently packaging 3.0.7, so it might take a while before this release shows up in the apt repository.)
Via RedHat/CentOS packages
YUM repositories with RPMs are maintained by Erik Ogan and Stealthy Monkeys Consulting. Please note that Erik is currently packaging 3.0.7, so it might take a while before this release shows up in the yum repositories.
Step 1: install the release package
The easiest way to install Phusion Passenger and keep it up to date is to install the passenger-release package from the main repository:
Fedora Core 14:
rpm -Uvh http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm
Fedora Core 13:
rpm -Uvh http://passenger.stealthymonkeys.com/fedora/13/passenger-release.noarch.rpm
RHEL 5 / CentOS 5 / ScientificLinux 5:
(Note: these packages depend on EPEL.)
rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
RHEL 6 / CentOS 6 / ScientificLinux 6:
These packages will be available as soon as there is a stable beta of either CentOS 6 or SL 6 to use as a build platform.
Step 2: use Yum
From there you can use Yum to install packages. For example, try one of these:
yum install nginx-passenger
or
yum install mod_passenger
or
yum install passenger-standalone
Building your own packages
There are instructions for building your own packages and Yum repositories in the rpm directory ReadMe within the GitHub repository.
Final
Phusion Passenger is provided to the community for free. If you like Phusion Passenger, please consider sending us a donation. Thank you!
Slight interruption of service at Union Station
At 3:00 PM CET a slight interruption of service has occurred due to network problems at our data center. As a result some databases could not be reached, resulting in the web interface displaying error messages. After 45 minutes, the network problems were restored. Access to the databases were restored 15 minutes later, at 4:00 PM CET, due to emergency checkups.
No data has been lost during this event. The Union Station server architecture was designed with failures like this mind; during the down time, all data sent to us was stored in a backlog. Our background workers restored the backlog at 4:25 PM CET, i.e. within 30 minutes.
In the past few weeks we’ve been fixing bugs, adding features as well as tuning and optimizing our backend servers. The tuning and optimizing have paid off greatly and it is evidenced by the fact that the background workers and the databases were holding up during peak load (which is around this time) while restoring the backlog. We shall blog about the changes in a new blog post soon.
Our apologies for the inconvenience caused today.
Introducing the Union Station filter language
Union Station is our state-of-the-art web application performance monitoring and behavior analysis service. It is currently in public beta, which started on March 2. You can follow us on Twitter through @unionstationapp.
One of the unique selling points of Union Station is that we collect data on all requests, not just the slow ones. Union Station is not just a performance monitor that warns you about slow requests, it’s a full web application behavior history browser: you can browse back into any point in time and see exactly what your web application was doing.
However we have noticed that there are quite some heavy-duty users on our beta who receive tons upon tons of traffic. For some of those people it might be unfeasible or undesirable to collect data on all requests. After our server cluster expansion we can process all that data just fine, but sending all that data to Union Station may still impose some stress on users’ network connections that they may want to avoid (note: Phusion Passenger already compresses data before sending to Union Station). Some users are just not interested in some data and don’t want them to be logged at all.
We are pleased to announce a new Union Station feature: the filter language. With this language one can specify which requests one wants and doesn’t want to log, e.g. because you are only interested in slow requests or only interested in requests to a certain controller. Filters are run on the client side and are supported since Phusion Passenger 3.0.5, released today. One writes filters in the Union Station filter language and specifies them in the web server config file. The result of a filter is either true (allow the given data to be sent to Union Station) or false (don’t allow the given data to be sent). After logging a request, Phusion Passenger runs all defined filters to determine whether to send the request’s data to Union Station.
Filters are defined with the UnionStationFilter
directive (Apache) or the union_station_filter
directive (Nginx).
The Union Station filter language somewhat resembles expressions in many popular languages such as C, Javascript and Ruby. Every filter is a combination of expressions, each of which evaluate to a boolean. An expression is either a matching expression or a function call.
Quick examples
Example 1: URI must be exactly equal to /foo/bar:
uri == "/foo/bar"
Example 2: Response time must be larger than 150 miliseconds (150000 microseconds):
response_time > 150000
Example 3: URI must match the regular expression /animals/(dog|cat)
and the response time must be larger than 60 miliseconds (60000 microseconds):
uri =~ /\/animals\/(dog|cat)/ && response_time > 60000
More information
Please read the Union Station help page for more information about this filter language.
Phusion Passenger 3.0.5 released
Phusion Passenger is an Apache and Nginx module for deploying Ruby web applications. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since version 3.0 it can also run standalone without an external web server, making it not only easier for first-time users but also ideal on development environments.
Recent changes
Phusion Passenger is under constant maintenance and development. We are pleased to announce Phusion Passenger version 3.0.5. This is a bug fix release.
- [Apache] Fixed Union Station process statistics collection
- Union Station users that are using Apache may notice that no process information show up in Union Station. This is because of a bug in Phusion Passenger’s Apache version, which has now been fixed.
- [Apache] PassengerAnalytics has been renamed to UnionStationSupport
- This option has been renamed for consistency reasons.
- [Nginx] passenger_analytics has been renamed to union_station_support
- This option has been renamed for consistency reasons.
- Fixed Union Station data sending on older libcurl versions
- Some Union Station users have reported that their data don’t show up. Upon investigation this turned out to be a compatibility with older libcurl versions. Affected systems include all RHEL 5 based systems, such as RHEL 5.5 and CentOS 5.5. We’ve now fixed compatibility with older libcurl versions.
- Added support for the Union Station filter language
- This language can be used to limit the kind of data that’s sent to Union Station. Please read the announcement and Union Station’s help page for details.
- Fixed a PassengerMaxPoolSize/passenger_max_pool_size violation bug
- People who host a lot of different applications on Phusion Passenger may notice that it sometimes spawns more processes than is allowed by PassengerMaxPoolSize/passenger_max_pool_size. This has been fixed.
How do I upgrade to 3.0.5?
Via a gem
First install the gem with the following command:
gem install passenger
If you’re using Phusion Passenger for Apache or for Nginx, then re-run the Apache or Nginx module installer, whichever is appropriate:
passenger-install-apache2-module passenger-install-nginx-module
At the end the installer will tell you to paste a configuration snippet into your web server config file. Replace the old snippet that you already had with this new one.
Phusion Passenger Standalone users don’t need to run anything else. Whenever you type
passenger start
it will automatically upgrade itself.
Via Ubuntu packages
John Leach from Brightbox has kindly provided Ubuntu packages for Phusion Passenger. The package is available from the Brightbox repository which you can find at:
http://apt.brightbox.net
Add the following line to the Third Party Software Sources:
deb http://apt.brightbox.net hardy main
(The simplest way to do that is to create a file in /etc/apt/sources.list.d/ containing the deb instruction, and then run ‘apt-get update’).
Once youâve done this then you can install Phusion Passenger by running:
sudo apt-get install libapache2-mod-passenger
-or-
sudo apt-get install nginx-brightbox
(Note that John is currently packaging 3.0.5, so it might take a while before this release shows up in the apt repository.)
Via RedHat/CentOS packages
YUM repositories with RPMs are maintained by Erik Ogan and Stealthy Monkeys Consulting. Please note that Erik is currently packaging 3.0.5, so it might take a while before this release shows up in the yum repositories.
Step 1: install the release package
The easiest way to install Phusion Passenger and keep it up to date is to install the passenger-release package from the main repository:
Fedora Core 14:
rpm -Uvh http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm
Fedora Core 13:
rpm -Uvh http://passenger.stealthymonkeys.com/fedora/13/passenger-release.noarch.rpm
RHEL 5 / CentOS 5 / ScientificLinux 5:
(Note: these packages depend on EPEL.)
rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm
RHEL 6 / CentOS 6 / ScientificLinux 6:
These packages will be available as soon as there is a stable beta of either CentOS 6 or SL 6 to use as a build platform.
Step 2: use Yum
From there you can use Yum to install packages. For example, try one of these:
yum install nginx-passenger
or
yum install mod_passenger
or
yum install passenger-standalone
Building your own packages
There are instructions for building your own packages and Yum repositories in the rpm directory ReadMe within the GitHub repository.
Final
Phusion Passenger is provided to the community for free. If you like Phusion Passenger, please consider sending us a donation. Thank you!
Union Station beta is back online, and here’s what we have been up to
Union Station is our web application performance monitoring and behavior analysis service. Its public beta was launched on March 2.
Within just 12 hours after the public beta launch of Union Station we were experiencing performance issues. Users noticed that their data wasn’t showing up and that the site is slow. We tried to expand our capacity on March 3 without taking it offline, but eventually we were left with no choice but to do so anyway. Union Station is now back online and we’ve expanded our capacity three fold. Being forced to take it offline for scaling so soon is both a curse and a blessing. On the one hand we deeply regret the interruption of service and the inconvenience that it has caused. On the other hand we are glad that so many people are interested in Union Station that caused scaling issues on day 1.
In this blog post we will explain:
- The events that had led to the scaling issues.
- What capacity we had before scaling, how our infrastructure looked like and what kind of traffic we were expecting for the initial launch.
- How we’ve scaled Union Station now and how our infrastructure looks like now.
- What we’ve learned from it and what we will do to prevent similar problems in the future.
Preparation work before day 1
Even before the launch, our software architecture was designed to be redundant (no single point of failure) and to scale horizontally across multiple machines if necessary. The most important components are the web app, MySQL, MongoDB (NoSQL database), RabbitMQ (queuing server) and our background workers. The web app receives incoming data, validates them and puts them in RabbitMQ queues. The background workers listen on the RabbitMQ queues, transform the data into more usable forms and index them into MongoDB. The bulk of the data is stored in MongoDB while MySQL is used to for storing small data sets.
Should scaling ever be necessary then every component can be scaled to multiple machines. The web app is already trivially scalable: it is written in Ruby so we can just add more Phusion Passenger instances and hook them behind the HTTP load balancer. The background workers and RabbitMQ are also very easy to scale: each worker is stateless and can listen from multiple RabbitMQ queues so we can just add more workers and RabbitMQ instances indefinitely. Traditional RDBMSes are very hard to write-scale across multiple servers and typically require sharding at the application level. This is the primary reason why we chose MongoDB for storing the bulk of the data: it allows easy sharding with virtually no application-level changes. It allows easy replication and its schemaless nature fits our data very well.
In extreme scenarios our cluster would end up looking like this:
We started with a single dedicated server with an 8-core Intel i7 CPU, 8 GB of RAM, 2×750 GB harddisks in RAID-1 configuration and a 100 Mbit network connection. This server hosted all components in the above picture on the same machine. We explicitly chose not to use several smaller, virtualized machines in the beginning of the beta period for efficiency reasons: our experience with virtualization is that they impose significant overhead, especially in the area of disk I/O. Running all services on the bare metal allows us to get the most out of the hardware.
Update: we didn’t plan on running on a single server forever. The plan was to run on a single server for a week or two, see whether people are interested in Union Station, and if so add more servers for high availability etc. That’s why we launched it as a beta and not as a final.
During day 1 and day 2
Equipped with a pretty beefy machine like this we thought it would hold out for a while, allowing us to gauge whether Union Station will be a success before investing more in hardware. It turned out that we had underestimated the amount of people who would join the beta as well as the amount of data they have.
Within 12 hours of launching the beta, we had already received over 100 GB of data. Some of our users sent hundreds of request logs per second to our service, apparently running very large websites. The server had CPU power in abundance, but with this much data our hard disk started becoming the bottleneck: the background workers were unable to write the indexed data to MongoDB quickly enough. Indeed, ‘top’ showed that the CPUs were almost idle while ‘iotop’ showed that the hard disks were running at full speed. As a result the RabbitMQ queues started becoming longer and longer. This is the reason why many users who registered after 8 hours didn’t see their data for several minutes. By the next morning the queue had become even longer, and the background workers were still busy indexing data from 6 hours ago.
During day 2 we performed some emergency filesystem tweaks in an attempt to make things faster. This did not have significant effect, and after a short while it was clear: the server could no longer handle the incoming data quickly enough and we need more hardware. The plan in the short term was to order additional servers and shard MongoDB across all 3 servers, thereby cutting the write load on each shard by 1/3rd. During the afternoon we started ordering 2 additional servers with 24 GB RAM and 2×1500 GB hard disks each, which were provisioned within several hours. We setup these new harddisks in RAID-0 instead of RAID-1 this time for better write performance, and we formatted with the XFS filesystem because that tends to perform best with large database files like MongoDB’s. By the beginning of the evening, the new servers were ready to go.
Update: RAID-0 does mean that if one disk fails we lose pretty much all data. We take care of this by making separate backups and setting up replicas on other servers. We’ve never considered RAID-1 to be a valid backup strategy. And of course RAID-0 is not a silver bullet for increasing disk speed but it does help a little, and all tweaks and optimizations add up.
Update 2: Some people have pointed out that faster setups exist, e.g. by using SSD drives or by getting servers with more RAM for keeping the data set in memory. We are well aware of these alternatives, but they are either not cost-effective or couldn’t be provisioned by our hosting provider within 6 hours. We are well aware of the limitations of our current setups and should demand ever rise to a point where the current setup cannot handle the load anymore we will definitely do whatever is necessary to scale it, including considering SSDs and more RAM.
MongoDB shard rebalancing caveats
Unfortunately MongoDB’s shard rebalancing system proved to be slower than we hoped it would be. During rebalancing there was so much disk I/O we could process neither read nor write requests in reasonable time. We were left with no choice but to take the website and the background workers offline during the rebalancing.
After 12 hours the rebalancing still wasn’t done. The original server still had 60% of the data, while the second server had 30% of the data and the third server 10% of the data. Apparently MongoDB performs a lot of random disk seeks and inefficient operations during the rebalancing. Further down time was deemed unacceptable so after an emergency meeting we decided to take the following actions:
- Disable the MongoDB rebalancer.
- Take MongoDB offline on all servers.
- Manually swap the physical MongoDB database files between server 1 and 3, because the latter has both a faster disk array as well as more RAM.
- Change the sharding configuration and swap server 1 and 3.
- Put everything back online.
These operations were finished in approximately 1.5 hours. After a 1 hour testing and maintenance session we had put Union Station back online again.
Even though MongoDB’s shard rebalancing system did not perform to our expectations, we do plan on continuing to use MongoDB. Its sharding system – just not the rebalancing part – works very well and the fact that it’s schemaless is a huge plus for the kind of data we have. During the early stages of the development of Union Station we used a custom database that we wrote ourselves, but maintaining this database system soon proved to be too tedious. We have no regrets switching to MongoDB but have learned more about its current limits now. Our system administration team will take these limits in mind next time we start experiencing scaling issues.
Our cluster now consists of 3 physical servers:
- All servers are equipped with 8-core Intel i7 CPUs.
- The original server has 8 GB of RAM and 2×750 GB harddisks in RAID-1.
- The 2 new servers have 24 GB of RAM each and 2×1500 GB harddisks in RAID-0 and are dedicated database servers.
Application-level optimizations
We did not spend the hours only idly waiting. We had been devising plans to optimize I/O at the application level. During the down time we had made the following changes:
- The original database schema design had a lot of redundant data. This redundant data was for internal book keeping and was mainly useful during development and testing. However it turned out that it is unfeasible to do anything with this redundant data in production because of the sheer amount of it. We’ve removed this redundant data, which in turn also forced us to remove some development features.
- One of the main differentiation points of Union Station lies in the fact that it logs all requests. All of them, not just slow ones. It logs a lot of details like events that have occurred (as you can see in the request timeline) and cache accesses. As a result the request logs we receive can be huge.
We’ve implemented application-level support for compression for some of the fields. We cannot compress all fields because we need to run queries on them, but the largest fields are now stored in gzip-compressed format in the database and are decompressed at the application level.
How we want to proceed from now
We’ve learned not to underestimate the amount of activity our users generate. We did expect to have to eventually scale but not after 1 day. In order to prevent a meltdown like this from happening again, here’s our plan for the near future:
- Registration is still closed for now. We will monitor our servers for a while, see how it holds up, and it they perform well we might open registration again.
- During this early stage of the open beta, we’ve made the data retention time 7 days regardless of which plan was selected. As time progresses we will slowly increase the data retention times until they match their paid plans. When the open beta is over we will honor the paid plans’ data retention times.
Union Station beta registration temporarily closed due to overwhelming success (aka capacity issues ;-))
After launching the public beta to Union Station yesterday afternoon, we saw sign ups ramp up fairly quickly. As we were nearing the 1000 beta user limit in a matter of hours, we noticed some very popular mainstream sites (you know who you are đ ) signing up for the beta as well. Due to this overwhelming success and the size of some of the monitored sites, we’ve been unable to accurately anticipate for the hardware requirements for this beta. Even though we’re thrilled to see so many exciting companies and individuals already making use of the beta of Union Station, it has unfortunately started to negatively affect the user experience for our beta testers as well. In particular, it appears the UI is not showing the most recent metrics for some of our beta testers as this data is still being processed in the background.
In our effort to get the best user experience for our beta testers, we’re looking into expanding our capacity and new hardware is already underway. In the mean time, we’ve unfortunately had to start temporarily disabling accounts until we get the new hardware in place and set up to move over those accounts.
This also means that we’re unfortunately not able to accept new Union Station beta registrations for the time being. We’re working around the clock however to fix this and would like to offer you our apologies for this (temporary) inconvenience. Please bear with us!
For further updates on Union Station, please consider following @unionstationapp on twitter as well.
Introducing Union Station: our web app performance monitoring and behavior analysis service; now in open beta

Web application monitoring: easy, high quality, detailed and low overhead
We are pleased to announce Union Station, our state-of-the-art web application performance monitoring and behavior analysis service. It aids web application developers by helping them to understand their web application’s behavior and identifying bottleneck and problems. It aids system administrators by notifying them of potential problems so that they may react quickly. As a result, it aids organizations as a whole by improving visitor satisfaction. Union Station supports Ruby and Rails web applications through Phusion Passenger.

We have been testing Union Station in private with various parties for some time now. Today we are taking things to the next level by opening Union Station for public beta testing. During this beta period we allow up to 1000 sign ups. This is because we take user feedback seriously and by limiting the number of sign ups we believe we can process feedback better.
Union Station is to become a paid subscription service. We will offer a variety of plans with different features and characteristics. But during the open beta Union Station is entirely free of charge. When the open beta ends we won’t bill you until you’ve explicitly given chosen to pay. The open beta ends when we think we’ve gathered sufficient feedback.
Main highlights and differentiation points
Easy
Union Station differentiates itself by being extremely easy to use and to setup. Our web interface is carefully designed for maximum usability. With Union Station, you will not waste time learning how it works and how to make it work only to give up in frustration hours later.

Union Station monitors and indexes many different kinds of information and displays them in a friendly web interface.
Detailed
Union Station monitors and indexes response times, memory usage, database accesses, cache accesses, web application process histories and request information.
One can browse freely into any time in history (as far as data retention allows) and see exactly what the web application was doing at that time: its processed requests, its memory usage behavior, its application processes, and more.
Hosted
Union Station is a hosted service that works on a subscription basis. Your data will be sent to us for processing, and we will index it and display it on a slick web interface. Different plans are available with different data retention times and features.
By being hosted, you do not need to install complex software on your servers for processing data, do not need to worry about updating that software and do not need to worry about backing up the data. We will take care of all that.

Important information is visualized in charts and placed strategically to allow easy comparison.
Secure
We believe that security should not be a premium feature. Attacking unsecured network connections is now easier than ever with the availability of tools like Firesheep. In order to protect our users, we encrypt all data sent to us through HTTPS and the use of HTTPS for our web interface is mandatory. HTTPS is the same security protocol used by banks and other organizations in which security is of utmost importance. Your security is dealt with the greatest care.
API
An HTTP/REST application programming interface is provided for querying data from Union Station. This allows you or your IT department to create automation tools that take advantage of the information provided by Union Station.
Relating data
We understand that when things go wrong, multiple sources of information must be consulted. We link related information together so that this job becomes easy. For example, given a request, one can easily query the database actions that were executed and query the web application’s memory behavior during that point in time.
Improvement progress feedback
Union Station also allows one to compare recent metrics with metrics in an earlier point in time, in order to determine whether improvements have had effect.
Clustering support
Union Station fully supports web applications that are clustered over multiple machines. We are able to collect data for each machine in the cluster and display everything in a single web interface.
Notifications
Don’t find out that your servers are over capacity until it’s too late. Union Station can automatically keep an eye on your resource usages such as CPU usage, memory usage and response times and notify you if things don’t look so well. Notification is near-instant and happens through email, though SMS support is in the works.
Multi-tenant
Union Station supports multiple user accounts as well as access control. One can easily share web application data with multiple users under a secured environment: the data is only available to those users who have been given explicit accesss. Additional user accounts are free, we only charge for data collection and processing.
Firewall install
We understand that some organizations cannot allow their data to leave their firewalls. Other organizations simply have too much traffic to make sending data to an external service feasible. It is for these reasons that we will also provide a firewall install in the future. Please contact us for licensing details.
Quality through specialization
We believe in doing few things instead of many things, but doing them very, very well so that we can commit ourselves to the highest product quality. It is for this reason that Union Station currently supports all Rails as well as all Ruby (Rack) web applications in combination with Phusion Passenger 3, but not web applications written in other languages or web applications deployed on application servers other than Phusion Passenger.

The request timeline, a unique feature made possible by tight Phusion Passenger integration.
Union Station support is tightly integrated into Phusion Passenger. This brings the following benefits:
- Union Station can gather information that other monitoring products can not, such as detailed request timing information.
- Enabling Union Station support only requires a few configuration lines. There’s no need to install separate plugins or daemons for data collection, greatly reducing installation and setup risk.
- Many other monitoring products impact the performance of web applications due to the way they collect data. However, Phusion Passenger’s Union Station support is written in carefully coded C++, allowing the highest degree of performance and the lowest possible overhead.
You can also follow us on Twitter @unionstationapp.