Hands-on with a serverless architecture example
I introduced serverless architectures in Chapter 6, Impact of the Cloud on the Software Architecture Practice, so it is time to go through a small example to let you taste the serverless flavor. Remember that true serverless is based on fully delegating the infrastructure to the cloud provider, and costs are consumption-based. Therefore, it is hard to be cloud-agnostic, so I had to choose a cloud vendor for this example. Due to this, I went for Azure. The following diagram shows our very simple application:
We are going to reuse the same K8s cluster to host the event publisher, which publishes events to a custom event grid topic. An Azure function, represented by the event handler in the preceding diagram, subscribed to our topic and gets triggered by the event grid whenever a new event is being pushed. As I explained earlier, serverless architectures...