TIL #1 - 2019-01-01

Published on 2019-01-01

Today I learned how to do split testing in Nginx serving static files. It turns out it is actually easy enough.

Netlify let's me perform split testing using different branches in a repository. This is great for testing out different layouts, flows etc. - and I wanted to do something similar with static pages served on my own server so I started researching how to do this with Nginx.

It is perfectly possible to write a simple server in Go that performes the split - but it seems like a waste of time.

The first article I found was rather useless (check it out for yourself) since it describes how to do it with Nginx Plus or using a token in the request parameters - both of these are not an option for me.

Then I found this article which brought home the gold - it describes how to do this perfectly.