Server load test

I’ve recently tried Digitalocean hosting and decided to host this blog on it. I’m running a $5 / month server, or droplet as they call it, with 1 CPU, 512 MB of ram, 20 GB SSD and 1 TB of bandwidth. You even get $10 credit when you sign up, sweet!

You may look down on a $5 machine but I’ve found it to be more than enough for my need.

I’m serving “static” content that has been generated by Hugo

I recently ran some load testing at work for a newly launched website so I decided to test this $5 server. I’ve been using loader.io since its basic usage is free.

The test

The server responds to a certain number of clients every second for a full minute.

The majority of the users must receive the page in < 5 secs. Only the html is loaded.

Plain HTML

10.000 requests a second! (that is the maximum that loaded.io goes on a free plan)

Don’t let the number in the graph fools you, clients can be connected for more than 1 second and therefore count in the next frame.
View on loader.io

Enable strong HTTPS

How strong you say?

As expected enabling https is taking its toll. The server can’t accommodate less than half of the requests, “just” 4.000.
View on loader.io

Full on PageSpeed on strong HTTPS

I’ve then enabled Google’s PageSpeed module for nginx and enabled every performance related filter!

I’ve enabled 27 extra filters on top of the 34 enabled by default, leaving just 7 out that were just for compatibility or counterproductive, hell I’ve even enabled the filter to make the G analytics script async when it’s already implemented that way.

Result: a quite dramatic 150 clients/sec 😀
View on loader.io

Here is the list of filters that I’ve enabled:

pagespeed EnableFilters responsive_images;
pagespeed EnableFilters outline_css;
pagespeed EnableFilters outline_javascript;
pagespeed EnableFilters move_css_above_scripts;
pagespeed EnableFilters move_css_to_head;
pagespeed EnableFilters rewrite_style_attributes;
pagespeed EnableFilters prioritize_critical_css;
pagespeed EnableFilters make_google_analytics_async;
pagespeed EnableFilters canonicalize_javascript_libraries;
pagespeed EnableFilters inline_google_font_css;
pagespeed EnableFilters local_storage_cache;
pagespeed EnableFilters convert_to_webp_animated;
pagespeed EnableFilters insert_image_dimensions;
pagespeed EnableFilters inline_preview_images;
pagespeed EnableFilters resize_mobile_images;
pagespeed EnableFilters remove_comments;
pagespeed EnableFilters collapse_whitespace;
pagespeed EnableFilters elide_attributes;
pagespeed EnableFilters extend_cache_pdfs;
pagespeed EnableFilters sprite_images;
pagespeed EnableFilters rewrite_domains;
pagespeed EnableFilters trim_urls;
pagespeed EnableFilters remove_quotes;
pagespeed EnableFilters defer_javascript;
pagespeed EnableFilters dedup_inlined_images;
pagespeed EnableFilters lazyload_images;
pagespeed EnableFilters insert_dns_prefetch;

Brotli (max compression)

Just add Accept-Encoding: br to loader.io request headers and… 75 clients / sec. Not bad considering that I’ve enabled the maximum (11) level of compression!
View on loader.io

..and, if you are curious about the compression, my homepage file sizes are (method from Mozilla’s brotli post ):

Algorithm Size
none 9508
gzip 3344
brotli 2732