Make payments, emails, and state changes idempotent.
How: Use unique request IDs.
If the ID is already processed then return โsuccessโ without doing it again.
One rule that prevents millions in losses.
#100DaysOfArchitecture
Day 19/100
Most outages happen because a retry action created duplicates (double charges, double emails).
The question is: โIs this operation safe to retry?โ
#100DaysOfArchitecture
Strong consistency required in money, seats, inventory, usernames
Eventually consistent is OK in likes, views, recommendations, news feed
Write this table on Day 1.
It decides your database, queues, and service boundaries for the next few years.
#100DaysOfArchitecture
Day 18/100
Most โcanโt scaleโ issues are actually hidden consistency bugs.
List every piece of data and answer:
โ Can it be eventually consistent?
โ Or must it be strongly consistent?
#100DaysOfArchitecture
Write the runbook before you write the code.
โOne-click rollbackโ and โhow to restore moneyโ are the only features that would matter when shit hits the fan.
#100DaysOfArchitecture
Day 17/100
If your system has no documented โrunbookโ for the worst failure then it will fail exactly that way at 3 am on a random unexpected day.
#100DaysOfArchitecture
Good errors tell exactly:
- What failed
- Why it matters
- What the user can do next
Vague errors = lost money + lost trust.
Make errors part of the design, not an afterthought.
#100DaysOfArchitecture
Day 16/100
If your error message says โSomething went wrongโ
then your entire architecture just lied to the user and the team.
#100DaysOfArchitecture
Real architecture skill isnโt adding new services.
Itโs having the courage to kill the old ones that everyone is afraid to touch.
In order words break that codebase even if it still manages to work
Delete first then Design a second one.
#100DaysOfArchitecture
Day 15/100
The dirty secret nobody says out loud:
Most โsystem redesignsโ happen because someone was too scared to delete old code.
#100DaysOfArchitecture
If a change takes more than 15 minutes from commit to live then your architecture is broken, no matter how many microservices you have.
Deploy speed is the ultimate test of any architecture.
#100DaysOfArchitecture
Day 14/100
Perfect architecture on paper is useless
if the team canโt deploy features 10 times per day without breaking production.
#100DaysOfArchitecture
Database choice, data model, consistency rules, transaction boundaries = your entire architecture.
Decide these on Day 1 based on your deadly decisions (Day 11), not on whatโs trendy.
#100DaysOfArchitecture