The monolithic approach
With a monolith, everything about the service is in one place – the API, database, and all associated tools are managed as part of one code base. Let's take a very simple example of a traditional monolithic application: a hotel booking website.
Besides the static HTML content, the website has a booking feature that will let its users book hotels in any city in the world. Users can search for hotels, then book them with their credit cards.
When a user performs a search on the hotel website, the application goes through the following steps:
- It runs a couple of SQL queries against its hotel database.
- An HTTP request is made to a partner's service to add more hotels to the list.
- Results are sent to the JavaScript embedded in the web page, to render the information for the viewer.
From there, once the user has found the perfect hotel and selected the booking option, the application performs these steps:
...