How can we take our existing Ruby on Rails applications and run them inside a Docker Container? In a recent post, we talked about Docker containers, and what you should know about them. Hopefully we cleared up any confusion you might have had about the Docker ecosystem. Perhaps with all that talk, it got you thinking about trying it out on one of your own applications? Well in this post we’d like to show you how easy it is to take your existing Ruby on Rails applications and run them inside a container. So, let’s assume you have an existing Rails project with a PostgreSQL database, and let’s walk you through the steps it would take to run this in a container instead. It’s a lot easier than you probably think! Read more
These days Docker is everywhere! Since this popular, open-source container tool first launched in 2013 it has gone on to revolutionize how we think about deploying our applications. But if you missed the boat with containerization and are left feeling confused about what exactly Docker is and how it can benefit you, then we’ve put together this post to help clear up any confusion you might have. What are Docker Containers? We take a look at the 8 things that you should know about Docker containers. We'll cover everything from Dockerfiles to Docker Compose to Docker Hub. Read more
How much memory is really available on your Linux box? Don't use /proc/meminfo to find out, use free -m instead. You may have more memory available than you thought. Here's an example. /proc/meminfo says about 330MB is free: ~ $cat /proc/meminfo MemFree: 340996 kB .. free -m gives the following: ... Read more
Mint is a shiny new elixir package which allows you to make HTTP requests using the HTTP 1, and HTTP 2 protocols. Let us see how we can start using it to improve our web apps performance. Read more
When I do a code review, one of the scariest things I see is logic like this: if Rails.env.production? do_additional_work end Why? Your beautiful tests and tightly integrated CI system won't execute that code. You won't see that code execute as you refresh your browser in development. From syntax errors ... Read more
Rails dominates Ruby web frameworks: the next most popular framework, Sinatra, has 5% of the popularity of Rails . However, that doesn't mean non-Rails frameworks like Sinatra and Grape don't have their place. When does it make sense to step away from ActionController and use another framework? What are the ... Read more
The 2019 edition of PyCon USA takes place over the next few days in Cleveland, Ohio - and Scout is delighted to be there, sharing our APM tool with the Python community. Read more
There are at least three ways in which you can control how much CPU time a process gets: Use the nice command to manually lower the task's priority; use the cpulimit command to repeatedly pause the process so that it doesn't exceed a certain limit; use Linux's built-in control groups, a mechanism which tells the scheduler to limit the amount of resources available to the process. Read more
I'm an engineer by trade. I rely on intuition when investigating a slow Django app. I've solved a lot of performance issues over the years and the short cuts my brain takes often work. However, intuition can fail. It can fail hard in complex Django apps with many layers (ex: ... Read more
Forecasting traffic to your web app is important for capacity planning, but generating a seasonally accurate model of your traffic is pretty daunting. If you under-forecast: Your app servers may become oversaturated, and requests will start backing up in a queue. If you over-forecast you may end up overspending. Read more