DEV Community

Mads Quist
Mads Quist

Posted on

Running our test environment fully on Nanos

We've probably all had this dream of waking up in the morning and finding ourselves with 10,000 new users on our platform. (At least as a Co-Founder & CTO, that's the dream) 😁

So we asked ourselves: can we run a dedicated environment of our platform entirely on nanos?

Spoiler: it worked, and it taught us a lot about where our real inefficiencies were hiding.

Here are some of these learnings:

The Reality of Scaling:

When your startup does grow and you start scaling your infrastructure, what really happens? Often it turns out that:

  • Important indexes are missing, leading to CPU spikes.
  • Query results are loaded into memory without paging, causing out-of-memory errors.
  • Other inefficiencies appear that raw cloud scaling alone cannot solve.

The result is often not a sleek, hyper-scalable system but an extremely expensive piece of cloud infrastructure.

The best part about scaling: Downsizing

What's great about the cloud is not just that it scales up. It also lets you scale down.

Recently, we ran a load test we called nano testing. The idea was simple: take our infrastructure and run it on AWS EC2 nano instances. That is as small as it gets on AWS.

A nano instance has 512MB RAM and 2 virtual CPUs. That reminds me of my gaming PC from the year 2000. For comparison, your smartphone today probably has 10–20 times more RAM. We then dumped in about four times the amount of test data we normally process.

Can It Run on Nanos?

The fun begins when you try to make your platform run decently on nanos. It does not have to be blazing fast. The key question is: does it run at all?

If some API queries take a few seconds, or some asynchronous jobs and emails are processed with a bit of lag, that is perfectly fine. If your system can handle this, it means you have built something resilient.

Running on nanos lets you pinpoint weaknesses in your platform very clearly. Fixes are often low-hanging fruit:

  • Add batch processing here.
  • Add an index there.
  • Add throttling in another place.

Our Approach at All Quiet

At All Quiet, we now run a dedicated testing environment entirely on nanos. This allows us to observe scaling issues early and fix them before they turn into real problems.

Top comments (0)