News
Difference between count, length and size in an association with ActiveRecord
With Rails/ActiveRecord, you can count the records in an association using three methods .count, .length, .size.As a rails newbie, when you first discover this, it can be confusing… Why do we need three methods? Is there any advantage to using one...
The Vanishing Thread and Postgresql TCP Connection Parameters
Like any good story, this one starts in the logs. Our platform engineering team noticed that we occasionally see very long-running requests that ran well past our SLA. They seemed to ignore any application timeouts so they timeout around 15 minute...
A slice of life: table partitioning in PostgreSQL databases
In any successful project, a surge in traffic, accompanied by increasing amounts of data which must be stored and processed, is an inevitability. Accordingly, the database itself is typically one of the main bottlenecks during rapid business growt...
How environment variables make your Ruby test suite flaky
Lots of apps use environment variables to manage environment-specific config. For example, an app might use environment variables to set 3rd party API keys. Or an app might use environment variables to toggle features on and off. Since environment...