Welcome to the 32 new subscribers who joined in the last week!
Thank you so much for your early support!
If you have any feedback on this challenge series and these review questions, please let me know!
Happy New Year!
I hope you’re all having a great holiday season. This is part 2 of the second architecture challenge. I hope you all enjoy this episode and it helps you take your architecture to the next level!
Just in case you missed it, here’s this month’s Architecture Design Requirements. We’re designing a Virtual Events and Hackathon Platform!
Serverless Architecture Challenge #2
A founder has identified a need for a Virtual Event Management platform. The target users include companies organising interactive community events and hackathons. The goal is to provide a solution for planning, hosting, and managing virtual events, including features such as event planning, virtual venue creation, ticketing, and analytics for participant engagement.
Review Questions
You’ve had a week to design some architecture, so let’s get onto reviewing it. Go through all of these questions and answer them for yourself. Some of them will be simple one or two-word answers, others will require a more detailed answer, and some may even require extra research, diagrams and notes.
Hopefully, some of these questions will highlight limitations in your architecture or ways you can improve your serverless architecture knowledge and skills. Limitations in your architecture aren’t bad - as long as you understand them and accept them.
Default Questions (Well-Architected Framework)
To start we have a set of questions that are generic to any type of architecture, serverless or not. These questions will be part of every self-review and are a great starting point. If there are any other questions you’d add to this list, send them over to me!
Security:
How do you secure your data in transit?
How do you secure your data at rest?
How is your architecture protected against malicious intent?
APIs
Storage ( database and file storage )
Reliability:
How would your infra react if an availability zone went offline for an hour?
Would your application still be usable?
Would there be any temporary or permanent loss of data?
Would that be acceptable?
How would your infra react if a whole region went offline for an hour?
Would your application still be usable?
Would there be any temporary or permanent loss of data?
Would that be acceptable?
How would your application react if your traffic increased 10x in 5 minutes? (An advert plays on tv)
Would your compute and database scale up to handle this quick increase in traffic
Might you hit some service limits?
If a developer added a recursive bug to the code that caused memory usage to spike, how would your application handle it?
What would happen if your database was corrupted or accidentally deleted?
Performance:
Might anything in your application cause user requests to fail to meet latency requirements?
How do you configure and optimise your compute resources? (EC2 instance type / Lambda memory)
What should the team be monitoring to ensure optimal performance?
Cost Optimisation:
What is the rough cost to run this application?
What is the most expensive component of your application?
What designs/patterns have been implemented to optimise costs?
What optimisations could be made to your architecture if the scale requirements were 100x?
Sustainability:
How does your architecture make the most of user usage patterns to improve sustainability?
Project specific questions / things to watch out for
How are you ensuring GDPR compliance?
Explicit authorisation to store and use data
Personal Data Security (storage and protection from unauthorised access)
Ability to request data
Ability to request the deletion or anonymisation of any of their data
What is the latency on the video solution you’ve gone with?
If a user disconnects from any of the chats (main or team) will they be able to get the message history
Are there any limitations on the number of participants in the event? Some video streaming tools have a limit on the number of connections
How ‘real time’ will your analytics be?
How are you tracking the number of participants who joined an event? How certain are you that there won’t be missed or double counts? This is used for billing!
You have a busy weekend and hit 5000 concurrent participants. Estimate that they are each sending 2 messages / min. Will this be an issue for your application?
You are asked to add a feature. Video chat for breakout teams. How difficult would it be to implement a feature like this?
A large company wants to do a company-wide hackathon. They have 15,000 staff. They want users to be able to log into the event using their company credentials. You still need to support other customers whilst this event is happening
How complicated would it be to extend your current architecture to handle this?
Are there any known limitations in your current architecture that could become an issue with increased scale?
What happens next?
Now that you’ve critiqued your own architecture, there may be things that you want to update or change.
But the best kind of feedback is still going to be peer review.
Upload your architecture and create your pull request into the github repo.
Then look through other people’s designs. Take note of where they’ve done things differently and why. It’s always amazing how much you can learn from other people.
Next week I’ll send out the third email for this challenge - my architecture. I’ll give my diagrams, as well as a breakdown of my thought processes and the considerations and limitations that I’ve accepted in my architecture.
Submit Your Architecture
Self review is really good, but having your architecture reviewed by others is always the gold standard. To enable this I’ve created a Github repo where you can upload your designs to get community feedback. You can also check out other people’s designs for further learning (after you’ve done your design).
To submit, follow these steps:
Fork the main repo (https://github.com/SamWSoftware/ServerlessArchitectureChallenge)
Clone your repo locally
Add a folder to
/{Challenge Number}/submissions/{Your Name}
Put whatever you want into that folder. Ideally an architecture diagram (png would be great) and some notes on how the architecture works and your process to get there
Push your changes
Create a PR into the main repo
If you want to view and discuss other people’s submissions then check out the open PRs.
If you have anything you would want to see in a future Serverless Community, let me know!
Why Self-Review Your Architecture
Learning to design software architecture on your own is hard for two main reasons:
You get tunnel vision. It’s incredibly hard to see your designs from another perspective once you’ve designed something. This means you’re less likely to find ways to improve it.
You don’t know what you don’t know! AWS and Serverless have lots of limits. Some of them are soft limits, but some are hard limits that you can’t change. If you don’t know that a DynamoDB record is limited to 400KB then you might design a solution that has growing records and won’t realise that
This is one of the reasons that I started this architecture challenge. To expose you to more designs and patterns - but also explicitly pointing out where different limits might affect your architecture.
The questions and things to watch out for will help you look at your architecture from a different angle and point out things to watch out for (service limits) that you might not have thought about, or even known about.
Tips for giving feedback
When giving feedback on other people’s architecture please be considerate. Some people will be serverless experts, some people will be designing some of their first realistic serverless architecture. Anyone being a dick will be blocked from commenting on the repo.
If you do see possible issues with someone’s design, try phrasing it as a question instead of a statement:
Bad - Your architecture won’t work. EventBridge can’t directly invoke SES.
Better - Is EventBridge able to directly invoke SES?
Bad - You shouldn’t directly invoke a Lambda from another Lambda.
Better - Why have you go a Lambda directly invoking another Lambda? Are there any limitations or drawbacks to doing it that way? Have you considered X pattern?
This is a much nicer way to get feedback, but also protects you if you’ve got something wrong.
If you like the idea of this Serverless Architecture Challenge then please share it with your friends and colleagues.
If you have any feedback, please email me at sam@completecoding.io
Good luck!
Sam