How to win the game of
trade-offs
Yan Cui
AWS Serverless Hero @theburningmonk
Yan Cui
http://theburningmonk.com
@theburningmonk
AWS user since 2010
Yan Cui
http://theburningmonk.com
@theburningmonk
Developer Advocate @
Yan Cui
http://theburningmonk.com
@theburningmonk
Independent Consultant
advise
training delivery
How to build a service for
scheduling one-off tasks
Calendar reminders
Stop cancelled subscriptions
…
How to build a service for
scheduling one-off tasks
Calendar reminders
Stop cancelled subscriptions
…
Goal: win the game of
trade-offs
Be explicit about the things that matter to you
Scheduling service for one-off tasks
Precision
Birthday reminder: within hours
Subscription service: within minutes
Multiplayer game: within seconds
Scheduling service for one-off tasks
Precision
Birthday reminder: within hours
Subscription service: within minutes
Multiplayer game: within seconds
Scheduling service for one-off tasks
Precision
Cost
Scalability
Hotspots
Be upfront about how much you care
about each of these in relative terms
Precision Cost Scalability Hotspots
?
? ?
?
Be upfront about how much you care
about each of these in relative terms
Con
fi
rmation bias
The tendency to search for, interpret, favor, and recall information in
a way that con
fi
rms or supports one's prior beliefs or values
Scheduling service for one-off tasks
Precision
Cost
Scalability
Hotspots
Scheduling service for one-off tasks
Precision
Cost
Scalability
Hotspots
time-to-market?
maintenance?
familiarity?
enterprise support?
Precision Cost Scalability Hotspots
$45
$15
$25
$15
Precision
Seconds Mins Hours Days …
Precision
Seconds Mins Hours Days …
OK! NOT OK!
Maintenance
Easier More Dif
fi
cult
Maintenance
Easier More Dif
fi
cult
OK! NOT OK!
Maintenance
Easier More Dif
fi
cult
OK! NOT OK!
Maintenance
Easier More Dif
fi
cult
OK! NOT OK!
Maintenance
Easier More Dif
fi
cult
OK! NOT OK!
EventBridge Scheduler
Build vs Buy?
Build vs Buy?
Serviceful
Prefer using a service until
it’s not feasible
It’s not you. This stuff is hard.
It’s not you. This stuff is hard.
But you can get better at it with exercise
RemindMe
Google calendar competitor.
Users can set reminders for future events and receive SMS or
push noti
fi
cations 10 mins before the event.
RemindMe
RemindMe
Google calendar competitor.
Users can set reminders for future events and receive SMS or
push noti
fi
cations 10 mins before the event.
User reminders often cluster around public holidays and
sporting events. During which, the system needs to notify
millions of users.
RemindMe
Precision Cost Scalability Hotspots
?
? ?
?
Precision Cost Scalability Hotspots
$40
Precision Cost Scalability Hotspots
$40
$35
Precision Cost Scalability Hotspots
$40
$35
$15
Precision Cost Scalability Hotspots
$40
$35
$10
$15
EventBridge Scheduler
Precision Cost Scalability Hotspots
EventBridge Scheduler
Precision Cost Scalability Hotspots
EventBridge Scheduler
4
Precision Cost Scalability Hotspots
4
EventBridge Scheduler
10
Precision Cost Scalability Hotspots
4
EventBridge Scheduler
10 9
Precision Cost Scalability Hotspots
4
EventBridge Scheduler
10 9 3
Precision Cost Scalability Hotspots
$40
$35
$10
$15
3
Precision Cost Scalability Hotspots
4
EventBridge Scheduler
10 9
$40
$35
$10
$15
3
Precision Cost Scalability Hotspots
4
EventBridge Scheduler
10 9
$40
$35
$10
$15
4x15 10x10 9x40 3x35
3
Precision Cost Scalability Hotspots
4
EventBridge Scheduler
10 9
$40
$35
$10
$15
4x15 10x10 9x40 3x35
+ + +
3
Precision Cost Scalability Hotspots
4
EventBridge Scheduler
10 9
$40
$35
$10
$15
4x15 10x10 9x40 3x35
+ + +
625
Step Functions
Precision Cost Scalability Hotspots
Step Functions
Precision Cost Scalability Hotspots
Step Functions
10
1.
2.
3.
4.
4 states x 1,000,000 x $0.000025 = $100 per million scheduled events
Precision Cost Scalability Hotspots
Step Functions
10 1
Cost
$0.01 / mil $100 / mil
OK! NOT OK!
1
Precision Cost Scalability Hotspots
Step Functions
10 9
State Transition
peak rate
steady rate
1
Precision Cost Scalability Hotspots
Step Functions
10 9 5
1
Precision Cost Scalability Hotspots
Step Functions
10 9 5
$40
$35
$10
$15
1
Precision Cost Scalability Hotspots
Step Functions
10 9 5
$40
$35
$10
$15
10x15 1x10 9x40 5x35
+ + +
Precision Cost Scalability Hotspots
Step Functions
10 2 9 5
$40
$35
$10
$15
10x15 2x10 9x40 5x35
+ + +
695
Step Functions
EventBridge Scheduler
625 695
Step Functions
EventBridge Scheduler
625 695
Better at the things
we care more about
Cost
$0.01 / mil $100 / mil
OK! NOT OK!
EventBridge Scheduler
Be upfront about how much you care
about each of these in relative terms
productionreadyserverless.com
15% OFF with “serverlesssummit22”
How to win the game of trade-offs

How to win the game of trade-offs