Scaling workloads with a message broker
When developing a web application, one important aspect of the user experience that is often overlooked is the response time. Nothing can turn away a user more quickly than an application that is slow and sluggish. In the previous chapters, you learned how to reduce database queries with Redis for faster data access. In this chapter, you will take things further and cover how to scale a web application written with the Gin framework.
Before we get into why you need to scale the application workload, let's add another block to the architecture. The new service will parse a Reddit RSS feed and insert feed entries into the MongoDB recipes
collection. The following diagram illustrates how the new service integrates with the architecture:
The service will take a subreddit RSS URL as a parameter. We can create an RSS feed by adding .rss
to the end of an existing subreddit...