Engineering
- Engineering
- Last Updated: November 04, 2015
- Owen Ou
If your application is successful, there may come a time where you’re on an unsupported version of a dependency. In the case of the Heroku Platform API, this dependency was a very old version of Active Record from many years ago. Due to the complexity involved in the upgrade, this core piece of infrastructure had been pegged at version 2.3.18, which was released in March 2013. We're happy to announce that we've overcome the challenge and are now running Active Record 4.2.4, the latest version, in production. In this post, we'll describe the technical challenges we faced in the upgrade…
- Engineering
- Last Updated: October 21, 2015
- Fred Hebert
HTTP routing on Heroku is made up of three main logical layers: The state synchronization layer ensures that all nodes in the routing stack are aware of the latest changes in domains, application, and dyno locations across the platform; The routing layer chooses which dyno will handle an HTTP request (random or sticky), performs logging, error-reporting, and so on; The HTTP proxying layer handles the validation, normalization, and forwarding of requests between clients and dynos. This last part is the one the platform team is happy to open-source today with the Vegur library. Vegur can be thought of a bit…
- Engineering
- Last Updated: August 06, 2015
- Richard Schneeman
In a recent patch we improved Rails response time by >10%, our largest improvement to date. I'm going to show you how I did it, and introduce you to the tools I used, because.. who doesn’t want fast apps? In addition to a speed increase, we see a 29% decrease in allocated objects. If you haven't already, you can read or watch more about how temporary allocated objects affect total memory use. Decreasing memory pressure on an app may allow it to be run on a smaller dyno type, or spawn more worker processes to handle more throughput. Let's back…
- Engineering
- Last Updated: July 30, 2015
- Kevin Thompson
Earlier this month, the OpenSSL project team announced that three days later it would be releasing a new version of OpenSSL to address a high-severity security defect. In the end, this vulnerability resulted in another non-event for our customers, but we thought it might be useful and informative to share the process we went through to prepare for the issue. (more…)
- Engineering
- Last Updated: June 30, 2015
- Pedro Belo
Fun fact: the Heroku API consumes more endpoints than it serves. Our availability is heavily dependent on the availability of the services we interact with, which is the textbook definition of when to apply the circuit breaker pattern. (more…)
- Engineering
- Last Updated: May 02, 2024
- Koichi Sasada
This article introduces incremental garbage collection (GC) which has been introduced in Ruby 2.2. We call this algorithm RincGC. RincGC achieves short GC pause times compared to Ruby 2.1. About the Author: Koichi Sasada works for Heroku along with Nobu and Matz on C Ruby core. Previously he wrote YARV Ruby's virtual machine, and he introduced generational GC (RgenGC) to Ruby 2.1. Koichi wrote incremental GC for Ruby 2.2 and authored this paper. Background Ruby uses GC to collect unused objects automatically. Thanks to GC, Ruby programmers do not need to release objects manually, and do not need to worry…
- Engineering
- Last Updated: May 14, 2024
- Richard Schneeman
Debugging a large codebase is hard. Ruby makes debugging easier by exposing method metadata and caller stack inside Ruby's own process. Recently in Ruby 2.2.0 this meta inspection got another useful feature by exposing super method metadata. In this post we will look at how this information can be used to debug and why it needed to be added. One of the first talks I ever wrote was "Dissecting Ruby With Ruby" all about inspecting and debugging Ruby processes using nothing but Ruby code. If you've never heard of the Method method it's worth a watch. In short, Ruby knows…
- Engineering
- Last Updated: March 28, 2024
- Damien Mathieu
Working with our support team, I often see customers having timeout problems. Typically, their applications will start throwing H12 errors. The decision to timeout requests quickly wasn't made to avoid having long-running requests on our router, nor to only have fast apps on our platform, but because standard web servers do not handle these types of requests particularly well. How webservers work All webservers will work in a similar way. Any new request will go to a queue, and the server will process them one after the other. This means if you have 30 requests in your queue, each taking…
- Engineering
- Last Updated: June 03, 2024
- Richard Schneeman
Performance is important, and if we can't measure something, we can't make it fast. Recently, I've had my eye on the ActionDispatch::Static middleware in Rails. This middleware gets put at the front of your stack when you set config.serve_static_assets = true in your Rails app. This middleware has to compare every request that comes in to see if it should render a file from the disk or return the request further up the stack. This post is how I was able to benchmark the middleware and give it a crazy speed boost. How ActionDispatch::Static Works Right now to serve static…
- Engineering
- Last Updated: October 29, 2014
- David Gouldin
[Heroku Connect] [heroku_connect] is written primarily in Python using Django. It's an add-on and a platform app, meaning it's built on the Heroku platform. Part of our interface provides users with a realtime dashboard, so we decided to take advantage of socket.io and node.js for websocket communication. But like all Heroku apps, only one type of dyno can serve traffic. This left us with two choices: manage 2 apps, each with its own repo, and carefully consider when and how we deployed them, or find a way to serve both node and Django traffic from the same app. Luckily, fellow…
Subscribe to the full-text RSS feed for Owen Ou.