Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flying v. Driving: Myths, fears, and opportunity when going serverless

Flying v. Driving: Myths, fears, and opportunity when going serverless

Going serverless is a lot like deciding to fly instead of driving. Flying is routinely safer than driving to your destination but requires a high level of trust in your airline and many are still scared. We’ll explore going serverless by confronting fears and examining it’s new issues.

DevOpsDays denver 2018: https://youtu.be/I1dqiokgPfw

Tom McLaughlin

April 20, 2018
Tweet

More Decks by Tom McLaughlin

Other Decks in Technology

Transcript

  1. @tmclaughbos SERVERLESSOPS
    MYTHS, FEARS, AND OPPORTUNITY
    WHEN GOING SERVERLESS
    FLYING V. DRIVING

    View Slide

  2. HOW DID THIS TALK
    COME ABOUT?

    View Slide

  3. LET’S PLAN MY TRIP TO
    DENVER

    View Slide

  4. LET’S PLAN MY TRIP TO
    DENVER SEATTLE

    View Slide

  5. View Slide

  6. ACCIDENTS & FAILURE

    View Slide

  7. SERVERLESSOPS
    @tmclaughbos
    TRAVEL ACCIDENTS & FAILURE

    View Slide

  8. SERVERLESSOPS
    @tmclaughbos
    CLOUD ACCIDENTS
    & FAILURE

    View Slide

  9. @tmclaughbos SERVERLESSOPS
    THIS ISSUES I WORRY ABOUT WITH SERVERS
    ▸ Are we under or over sized?
    ▸ Do we have enough CPU, RAM, disk?
    ▸ Is every necessary service on the host running?
    ▸ Are we all up to date with OS patching?
    ▸ Is this sysctl or config value set?
    ▸ Are we on the right version? I think that was fixed two releases ago.

    View Slide

  10. @tmclaughbos SERVERLESSOPS
    THIS ISSUES I WORRY ABOUT WITH SERVERLESS
    ▸ Is the application responsive?
    ▸ Are application requests returned in a timely manner?
    ▸ What do application error rates look like?
    ▸ How do we handle application traffic spikes?
    ▸ How complex of a system have we built?

    View Slide

  11. @tmclaughbos SERVERLESSOPS
    ACCIDENTS AND FAILURE WHEN SERVERLESS
    ▸ AWS is probably better at the low-level undifferentiated work than you.
    ▸ Less control also means less things you can break.
    ▸ This frees you to worry about issues higher up the stack.

    View Slide

  12. COST

    View Slide

  13. @tmclaughbos SERVERLESSOPS
    LAMBDA VS. EC2 COSTS (THAT WE TELL OURSELVES)
    ‣ Instance: 1 x t2.nano
    Total: $4.25/month
    ‣ Requests: 2,678,400 (1rps)
    ‣ Duration: 100ms
    ‣ Memory: 128MB
    Total: $0.55/month

    View Slide

  14. SERVERLESSOPS
    @tmclaughbos
    HERE’S MY FLIGHT OPTIONS… THEY’RE EXPENSIVE

    View Slide

  15. @tmclaughbos SERVERLESSOPS
    TRAVEL BY CAR
    ((3000 miles / 26mpg) * $3.00/gal) * 2
    Total: $692 round trip

    View Slide

  16. @tmclaughbos SERVERLESSOPS
    TRAVEL BY CAR
    ((3000 miles / 36mpg) * $2.66/gal) * 2
    Total: $443 round trip

    View Slide

  17. @tmclaughbos SERVERLESSOPS
    FLIGHT V. DRIVING TO DENVER
    ((2000 miles / 36mpg) * $2.66/gal) * 2
    Total: $296 round trip

    View Slide

  18. AWS SAYS COMPANY XYZ SAVED 84%
    BY MOVING TO AWS LAMBDA…
    https://aws.amazon.com/solutions/case-studies/bustle/

    View Slide

  19. View Slide

  20. @tmclaughbos SERVERLESSOPS
    ACTUAL TRAVEL COSTS
    ‣ Ticket: $385
    ‣ Lyft:
    ‣ Airport <—> Home: $10 x 2
    ‣ Airport <—> Hotel: $29 x 2
    Total: $463
    ‣ Gas: $443
    ‣ Hotel: $152 (Cleveland: $43 + Minneapolis: $50 +
    Billings: $59)
    ‣ Meals
    ‣ Breakfast: $22.50 ($7.50 *3)
    ‣ Lunch: $30 ($7.50 * 4)
    ‣ Dinner: $22.50 ($7.50 * 3)
    ‣ Coffee: $30 ($3.75 * 8)
    Total: $700

    View Slide

  21. @tmclaughbos SERVERLESSOPS
    LAMBDA VS. EC2 COSTS (ACTUAL)
    ‣ Instance: 2 x m4.large ($146.40)
    ‣ SaaS services:
    ‣ Logging: $20 ($10 * 2)
    ‣ Security: $20 ($10 * 2)
    Total: $186.40/month
    ‣ Invocations: 2,678,400 ($0.557 - 1rps)
    ‣ Duration: 100ms
    ‣ Memory: 128MB
    ‣ Requests: 2,678,400 ($0.535)
    Total: $1.09/month

    View Slide

  22. @tmclaughbos SERVERLESSOPS
    LAMBDA VS. EC2 COSTS (ACTUAL)
    ‣ Instance: 2 x m4.large ($146.40)
    ‣ SaaS services:
    ‣ Logging: $20 ($10 * 2)
    ‣ Security: $20 ($10 * 2)
    Total: $186.40/month
    ‣ Invocations: 267,840,000 ($55.71 - 100rps)
    ‣ Duration: 100ms
    ‣ Memory: 128MB
    ‣ Requests: 267,840,000 ($53.56)
    Total: $109.27/month

    View Slide

  23. @tmclaughbos SERVERLESSOPS
    LAMBDA VS. EC2 COSTS (ACTUAL)
    ‣ Instance: 2 x m4.large ($146.40)
    ‣ SaaS services:
    ‣ Logging: $20 ($10 * 2)
    ‣ Security: $20 ($10 * 2)
    Total: $186.40/month
    ‣ Invocations: 267,840,000 ($223.38 - 100rps)
    ‣ Duration: 200ms
    ‣ Memory: 256MB
    ‣ Requests: 267,840,000 ($53.56)
    Total: $276.93/month

    View Slide

  24. @tmclaughbos SERVERLESSOPS
    BOTH OF THESE CAN BE TRUE
    ‣ “Lambda costs ~2X versus running a service on EC2.”
    ‣ “Lambda saved us 85% on our bill.”

    View Slide

  25. THE RIDE
    ITSELF

    View Slide

  26. @tmclaughbos SERVERLESSOPS
    THINGS YOU CAN DO WHILE DRIVING
    ▸ Drive

    View Slide

  27. @tmclaughbos SERVERLESSOPS
    THINGS YOU CAN DO WHILE FLYING
    ▸ Read
    ▸ Watch movies
    ▸ Deliver Twitter hottakes
    ▸ Email
    ▸ Code
    ▸ Write blog post
    ▸ Write a conference presentation

    View Slide

  28. I WANT THE FOCUS OF MY TRIP TO
    BE MY DESTINATION, NOT HOW I
    GOT THERE.

    View Slide

  29. SERVERLESSOPS
    @TMCLAUGHBOS
    WHAT I DO WITH SERVERS
    ‣ Managing a host deployment system
    ‣ Managing an app deployment system
    ‣ Config management
    ‣ Monitoring host state & metrics
    ‣ Monitoring app state & metrics
    ‣ Patching hosts
    ‣ Monitoring who logged in
    ‣ Scaling services

    View Slide

  30. SERVERLESSOPS
    @TMCLAUGHBOS
    WHAT I DO WITH SERVERLESS
    ‣ Managing a host deployment system
    ‣ Managing an app deployment system
    ‣ Config management
    ‣ Monitoring host state & metrics
    ‣ Monitoring app state & metrics
    ‣ Patching hosts apps
    ‣ Monitoring who logged in resource access
    ‣ Scaling services systems

    View Slide

  31. SERVERLESSOPS
    @tmclaughbos
    WHAT I WANT TO START MONITORING

    View Slide

  32. SERVERLESSOPS
    @tmclaughbos
    WHAT I USED TO FOCUS ON VERSUS WHAT I WANT TO FOCUS ON

    View Slide

  33. (THIS SLIDE LEFT BLANK)

    View Slide

  34. THANK YOU
    @tmclaughbos SERVERLESSOPS
    HTTPS://WWW.SERVERLESSOPS.IO

    View Slide