I was recently asked to come up with a solution for hosting some media files for a site. The requirements were pretty straight forward:
- Should be available via HTTP and HTTPS
- Minimal support requirements
- AWS Based
- Assets can be uploaded to the hosting with minimal effort/knowledge
- Site should be performant within Europe (in particular)
The rest of the post will detail why I chose the solution I did to satisfy those requirements and how I went about configuring it. It includes a generalised version of the configuration in Github and even a diagram to illustrate!
Something I have been meaning to do for a while is to switch away from Wordpress. While it is quite a nice collaborative tool and has some great options for WYSIWIG editing and content, it’s also far too big a hammer to use given my modest content and collaboration needs. I don’t have guest posters, I don’t get a lot of comments, and when I do get some interactions they would often work better in another medium (Twitter for example). I don’t have a lot of dynamic content and running Wordpress myself is not something I am particularly expert in.
I had been considering several options, but when I saw Steve’s work with Hugo I was sold (this was early days in the project and it was still pretty awesome). The big stumbling block was what to do with my old content and that stalled me out for a while. Around the same time as I contemplated the switch, I finally obtained the comerford.net domain - I had watched it for some time while someone sat on it, not using it, for years. I even tried making an offer for it (at what I considered a reasonable price) but got nothing, so I decided to wait for it to expire, which it eventually did.
This post took a while to write – when I started, it was my last day in MongoDB and finishing it I am over a week into my new role in Riot Games. It was a bittersweet moment – I was very excited to move on to my new adventure in Riot Games, but I was sad to leave a company that has been such a great place to work for the last three years. I decided to write this post partially as a record of what I enjoyed most, partly as a list of some of my accomplishments – memory fades and I have very much enjoyed reading similar posts from several years ago. I often wish I had written more in fact.
So, here it is, some random reflection on three great years, in no particular order. Due to the length, I’ll insert a jump, so click through if you would like to read on.
My (rather popular) first post on this topic explained the benefits of compression (which comes as the default option with the new WiredTiger storage engine) for systems with lesser IO capabilities. The intent was to first show that the new storage engine saved space on disk and then to show that this could be translated into a gain in terms of performance when reading that data (slowly) off disk.
The first part of that story worked out pretty well, the data was nicely compressed on disk and it was easy to show it in the graph. The second part of that story did not work out as expected, the graph was a little off from expectations and my initial speculation that it was a non-optimal access pattern didn’t pan out. In fact, I determined that the slowness I was seeing was independent of IO and was due to how slow the in-memory piece was when using WiredTiger to do a table scan. Needless to say, I started to talk to engineering about the issue and tried tweaking various options – each one essentially reinforced the original finding.
It was soon obvious that we had a bug that needed to be addressed (one that was still present in the first release candidate 2.8.0-rc0). I gathered the relevant data and opened SERVER-16150 to investigate the problem. Thanks to the ever excellent folks in MongoDB engineering (this one in particular), we soon had the first patched build attempting to address the issue (more, with graphs after the jump). Before that, for anyone looking to reproduce this testing, I would recommend waiting until SERVER-16150 has been closed and integrated into the next release candidate (2.8.0-rc1), you won’t see the same results from 2.8.0-rc0 (it will instead look like the first set of results).