In this chapter, we started by trying to understand why we need to run multiple instances of Goophr Librarian. Next, we looked at how to implement the updated concierge/api/query.go so that it can work with multiple instances of Librarian. Then we looked into why using docker-compose to orchestrate the application might be a good idea and what may be the various factors to keep in mind to make it work. We also updated the Librarian and Concierge codebase so that they would work seamlessly with docker-compose. Finally, we tested the complete application using a few small documents and reasoning about the expected order of results.
We were able to orchestrate all the servers we needed to run the complete Goophr application on our local machine using docker-compose. However, designing the architecture of a resilient web application to withstand heavy user traffic on the internet...