AWS Case Study 7 - Multi Region Website Monitoring
My very first AWS case study which I published last year was about building a simple website monitoring service using 3 AWS serverless webservices.
This service had one drawback though - in some cases it could provide false alarms. That was because the verification of website's availability was done by AWS Lambda function located in just ONE region of the world.
And as you know, internet consists of millions of networks and network nodes and malfunction of the network connectivity somewhere in between our monitoring node and the target website does not necessarily mean that our website must be down as well.
Advanced (Multi Region) Website monitoring
So what do we need to do to get rid of potential false alarms and to make our monitoring service more reliable?
We need to upgrade the monitoring service's architecture in a way that it can perform website verifications from multiple regions of the world in parallel.
And only if all verifications from all of these regions fail, we are going to assume that the target website went really down.
Let's do it!
High level architecture and its 3 layers
In order to build multi region monitoring solution, we are going to need the following 9 AWS services:
These webservices will be used across the following 3 layers:
Business layer
/click here to download the business layer architecture in higher resolution/
Notes:
Notification layer
/click here to download the notification layer architecture in higher resolution/
Notes:
Presentation layer
/click here to download the presentation layer architecture in higher resolution/
Notes:
Advanced (Multi Region) monitoring website
Actually this is the static HTML website which presentation layer generates.
领英推荐
Frequently Asked Questions (FAQ)
1) Why in your architecture did you decide to use Amazon SNS instead of AWS Step Functions for orchestration of AWS Lambda functions??
Because AWS Step Functions, unfortunately, does not support cross-region Lambda orchestration and Amazon SNS does.
2) Why is it needed to setup DynamoDB database table replication for all of the AWS regions that are used?
It is because standard Amazon DynamoDB table is reachable only from the AWS region in which it was created. Database table replication can make this table available for both READ and WRITE operations from multiple AWS regions.
3) Why is the response time mentioned below the individual region that high?
This is due to the fact that we are not doing traditional network ping operation in order to gather info about the round trip delay to the target node, but instead we are connecting to the target website via https protocol and fetching its content. So, overall, the following is incorporated into that response time:
4) How long did it take you to design and implement this 3 layered architecture?
It took me 1 weekend to design it and implement it, another weekend to fine-tune it and write article about. This is the beauty of serverless setup and deployments, they massively save time.
5) If I wanted to improve your solution to be even more advanced and helpful what would you suggest implementing as its next features?
There are many ideas to improve the current solution, these 3 are what I would recommend:
6) What are the monthly costs this monitoring solution may inflict?
Even though the overall architecture consisting of 3 layers looks quite complex and may seem that it may generate some substantial costs, suprisingly the costs of this solution are almost zero.
This is because of these 3 reasons:
Now, let's take a look at more details about the potential costs.
Business layer:?
Total costs: 0 USD/month.
Notification layer:
Total costs: between 0 and 0.16 USD/month (depending on the actual downtime duration)
Presentation layer:
7) Can you provide full instructions including the source code how to setup and configure this entire Multi Region website monitoring solution on AWS?
Yes, feel free to download the instructions for setting up all 3 layers with all of the steps described.
8) Can I contact you in case I have questions or get stuck with the solution implementation?
Yes, don't hesitate and feel free to contact me. You can reach me via my LinkedIn profile - I accept all requests to connect and will be glad to discuss this or other AWS architectures with you.
If you find this article insightful, please share it. Thank you!
IT at DHL
3 年A neat solution for a global Service Availability monitoring and alerting, well done!