Always Hired is in a position familiar to many in the tech industry. We have a product people find valuable, they are telling their friends, and interest in our product is increasing rapidly. Our computational infrastructure needs to keep up with growing demand. To solve this problem, we employ elastic beanstalk.
Amazon is unquestionably the leader in this space. Their product brings with it incredible power by elevating the management of server infrastructure into higher abstraction layers than we’ve seen in the past. Not only is it easy to think about infrastructure in the EB model, but the sheer amount of computational power Amazon will place under your control at a moment’s notice is exciting.
Another common problem we face is that we don’t have a large team. We’re a startup, so we implement solutions which require very low ongoing maintenance. Dealing with elastic beanstalk’s configuration files (ebextensions) runs contrary to our philosophy. Ebextensions are verbose, time consuming to test, and difficult to read. All of this translates to extra time for initial development and ongoing maintenance which we can’t afford. How did we deal with this problem? Docker.
Docker is another best-in-class technology. It is much easier to build a docker container than an EB instance, if for no other reason than one can easily edit and test docker files locally. Further, docker files are quite similar to shell scripts. Contrasted with ebextensions which have quite a few conventions and gotchas. Our api service alone had 3 files of ebextensions, each with over 100 lines of configuration. They turned into a single dockerfile containing about 25 lines. Our other microservices experience similar gains.
By combining docker and elastic beanstalk, we get the best of both worlds. We get the easy to stand up and low overhead configuration of docker. We get the massively scalable infrastructure of elastic beanstalk. I encourage anyone building web applications in 2017 to seriously consider these technologies for their respective roles. Finally, I would like to thank both Amazon and Docker for providing such valuable tools.