SlideShare una empresa de Scribd logo
1 de 55
Descargar para leer sin conexión
@TMCLAUGHBOS
WHAT DO WE DO WHEN THE SERVER
GOES AWAY?
SERVERLESS OPS
@TMCLAUGHBOSSERVERLESS OPS
SERVERLESS!!!
@TMCLAUGHBOSSERVERLESS OPS
SERVERLESS!!!
WHO IS THIS GUY UP
HERE?
@TMCLAUGHBOSSERVERLESS OPS
TOM MCLAUGHLIN: COMMUNITY ENGINEER CLOUD ZERO
BACKGROUND & BIASES
@TMCLAUGHBOSSERVERLESS OPS
I LIKE STARTUPS
@TMCLAUGHBOSSERVERLESS OPS
MY PROBLEMS MAY BE SMALLER OR DIFFERENT THAN YOURS
HOW DID I COME TO
ASK THIS QUESTION?
“WOW! LAMBDA IS
PRETTY COOL!”
“THAT DUDE IS A
WALKING BILLING ALERT”
IT ALL CAME TOGETHER!…
AND THEN FEAR SET IN.
"IF YOU DON’T CODE THEN
YOU’RE JUST AN I.T. PERSON”
WHAT IS SERVERLESS?
@TMCLAUGHBOSSERVERLESS OPS
2007: THE CLOUD IS JUST SOMEONE ELSE’S COMPUTER
@TMCLAUGHBOSSERVERLESS OPS
2017: SERVERLESS STILL USES SERVERS
@TMCLAUGHBOS
TL;DR: A SERVERLESS SOLUTION IS ONE THAT
COSTS YOU NOTHING TO RUN IF NOBODY IS
USING IT (EXCLUDING DATA STORAGE)
Paul Johnston / @PaulDJohnston
SERVERLESS OPS
@TMCLAUGHBOSSERVERLESS OPS
CHARACTERISTICS OF SERVERLESS
▸ Little to no maintenance (no “servers” to maintain)
▸ Everything is a system
▸ Event driven
▸ Consumption (not capacity) priced
▸ You scale systems, the component pieces auto-scale
@TMCLAUGHBOSSERVERLESS OPS
SERVERLESS COMPONENTS
▸ Functions-as-a-service (FaaS)
▸ AWS Lambda
▸ Public cloud services
▸ AWS SNS
▸ AWS SQS
▸ AWS DynamoDB
▸ AWS S3
@TMCLAUGHBOS
“SERVERLESS” IS JUST A NAME. WE COULD
HAVE CALLED IT “JEFF”
Paul Johnston / @PaulDJohnston
SERVERLESS OPS
WHERE DOES OPS FIT
INTO THIS WORLD?
OPS WILL GO AWAY AS MUCH AS IT
DID WITH THE ADOPTION OF PUBLIC
CLOUD
MEANING IT WONT. BUT
IT WILL CHANGE.
@TMCLAUGHBOSSERVERLESS OPS
WHAT EXISTING SKILLS ARE REALLY VALUABLE?
▸ Systems engineering
▸ Building
▸ Operating
▸ Understanding
▸ Scaling
▸ Debugging
▸ Knowing how things work
▸ AWS service limits, performance, etc.
▸ Tooling
▸ Understanding how things fail
@TMCLAUGHBOSSERVERLESS OPS
HOW WILL WE NEED TO CHANGE?
▸ YOU WILL HAVE TO CODE!
@TMCLAUGHBOSSERVERLESS OPS
HOW THIS MIGHT PLAY OUT?
▸ New team formations
▸ Becoming a “utility player” employee
@TMCLAUGHBOSSERVERLESS OPS
DEFINING THE OPS ROLE ON THE TEAM
▸ Developing system standards and best practices
▸ Knowing the build, deploy, and management tooling
▸ Reliability of systems
▸ Code review
▸ Performance tuning systems
▸ Evaluating costs of systems
DEVELOPING SYSTEM STANDARDS
AND BEST PRACTICES
@TMCLAUGHBOSSERVERLESS OPS
AWS RESOURCE PATTERNS: WEB REQUESTS
@TMCLAUGHBOSSERVERLESS OPS
AWS RESOURCE PATTERNS: MESSAGE PASSING (SNS)
▸ Pros
▸ Extensible
▸ Guaranteed delivery
▸ Cons
▸ If subscriber fails… Oh well.
▸ Questions
▸ How many messages will be passed; how
many Lambda subscriber invocations?
@TMCLAUGHBOSSERVERLESS OPS
AWS RESOURCE PATTERNS: MESSAGE PASSING (SQS)
▸ Pros
▸ Message druability
▸ Cons
▸ SQS is not a Lambda event source
▸ Questions
▸ How do you trigger Lambda?
▸ What is your consumer profile?
@TMCLAUGHBOSSERVERLESS OPS
AWS RESOURCE PATTERNS: MESSAGE PASSING (SNS -> SQS)
▸ Pros
▸ Durable
▸ Reliable
▸ Cons
▸ SQS cons
▸ Added cost
▸ Questions
▸ Same as SNS and SQS
@TMCLAUGHBOSSERVERLESS OPS
AWS RESOURCE PATTERNS: MESSAGE PASSING (KINESIS)
▸ Pros
▸ Fast
▸ Reliable
▸ Cons
▸ Expensive
▸ Questions
▸ Can I afford this?
@TMCLAUGHBOSSERVERLESS OPS
AWS RESOURCE PATTERNS: MESSAGE PASSING (LAMBDA FANOUT)
▸ Pros
▸ Fast!
▸ Cons
▸ Caller Lambda needs to handle errors
▸ Hidden service dependencies
▸ Questions
▸ How confident am I this is the best
idea?
KNOWING THE BUILD, DEPLOY,
AND MANAGEMENT TOOLING
@TMCLAUGHBOSSERVERLESS OPS
CLOUDFORMATION / SERVERLESS FRAMEWORK / ETC.
@TMCLAUGHBOSSERVERLESS OPS
CLOUDFORMATION / SERVERLESS FRAMEWORK / ETC.
# Should be replaced by https://www.npmjs.com/package/serverless-sqs-alarms-plugin
ArchiveSqsQueueAlarmStart:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmActions:
- Ref: ArchiveSnsNotify
AlarmName:
- Fn::GetAtt:
- ArchiveSqsQueueAlarmStart
- QueueName
AlarmDescription: 'Queue has messages'
ComparisonOperator: GreaterThanThreshold
Dimensions:
- Name: QueueName
Value: ArchiveSqsQueue
EvaluationPeriods: 1
MetricName: ApproximateNumberOfMessagesVisible
Namespace: AWS/SQS
Period: 60
Statistic: Sum
Threshold: 1
@TMCLAUGHBOSSERVERLESS OPS
CLOUDFORMATION / SERVERLESS FRAMEWORK / ETC.class Plugin {
constructor (serverless, options) {
this.serverless = serverless
this.hooks = {
'package:compileEvents': this.beforeDeployResources.bind(this)
}
}
beforeDeployResources () {
if (!this.serverless.service.custom || !this.serverless.service.custom['sqs-alarms']) {
return
}
const alarms = this.serverless.service.custom['sqs-alarms'].map(
data => new Alarm(data, this.serverless.getProvider('aws').getRegion())
)
alarms.forEach(
alarm => alarm.ressources().forEach(
ressource => {
_.merge(
this.serverless.service.provider.compiledCloudFormationTemplate.Resources,
ressource
)
}
)
)
}
}
module.exports = Plugin
@TMCLAUGHBOSSERVERLESS OPS
CLOUDFORMATION / SERVERLESS FRAMEWORK / ETC.
custom:
sqs-alarms:
- queue: ArchiveSqsQueue
topic: ArchiveSnsNotify
name: ArchiveSqsQueueAlarmStart # optional parameter
thresholds:
- 1
- 50
- 100
- 500
treatMissingData: string | array[] # optional parameter
RELIABILITY OF
SYSTEMS
@TMCLAUGHBOSSERVERLESS OPS
SOMEONE WILL TRY AND SHIP THIS
@TMCLAUGHBOSSERVERLESS OPS
SOMEONE WILL TRY AND SHIP THIS
@TMCLAUGHBOSSERVERLESS OPS
YOU SHOULD BE SEEING THIS IN YOUR HEAD
@TMCLAUGHBOSSERVERLESS OPS
SECURITY
CODE REVIEW
@TMCLAUGHBOSSERVERLESS OPS
LAMBDA CODE BEST PRACTICES
import boto3
import logging
import os
_logger = logging.getLogger(__name__)
# Initialize objects outside of handler to make use of container reuse
s3_client = boto3.client('s3')
def handler(event, context):
# Do one thing and do it well.
'''Archive a a message to S3.'''
# The S3 bucket name is set by deployment
# framework referencing the S3 bucket resource it creates.
s3_bucket_name = os.environ.get('S3_BUCKET')
resp = s3_client.put_object(
Body=event.get(‘Records')[0].get('Sns').get('Message').encode(),
Bucket=s3_bucket_name,
Key=event.get('Records')[0].get('Sns').get('Subject')
)
return resp
@TMCLAUGHBOSSERVERLESS OPS
CODE ORGANIZATION
@TMCLAUGHBOSSERVERLESS OPS
CODE ORGANIZATION
PERFORMANCE TUNING
SYSTEMS
@TMCLAUGHBOSSERVERLESS OPS
SCALING AND OPTIMIZING PERFORMANCE
1,000 Users 100,000 Users
@TMCLAUGHBOSSERVERLESS OPS
AWS X-RAY
EVALUATING COSTS OF
SYSTEMS
@TMCLAUGHBOSSERVERLESS OPS
APPLICATION DOLLAR MONITORING
WE HAVE ADAPTED BEFORE
AND WE WILL ADAPT AGAIN!
THANK YOU!
HTTP://STRAYC.AT/
SERVERLESSOPS-FEEDBACK

Más contenido relacionado

Similar a Serverless Ops: What do we do when the server goes away?

NoSQL Revolution: Under the Covers of Distributed Systems at Scale (SPOT401) ...
NoSQL Revolution: Under the Covers of Distributed Systems at Scale (SPOT401) ...NoSQL Revolution: Under the Covers of Distributed Systems at Scale (SPOT401) ...
NoSQL Revolution: Under the Covers of Distributed Systems at Scale (SPOT401) ...
Amazon Web Services
 
Surviving Hadoop on AWS
Surviving Hadoop on AWSSurviving Hadoop on AWS
Surviving Hadoop on AWS
Soren Macbeth
 

Similar a Serverless Ops: What do we do when the server goes away? (20)

Instrumenting your Instruments
Instrumenting your Instruments Instrumenting your Instruments
Instrumenting your Instruments
 
How to develop Alexa Skill Kit based on Serverless Architecture
How to develop Alexa Skill Kit based on Serverless ArchitectureHow to develop Alexa Skill Kit based on Serverless Architecture
How to develop Alexa Skill Kit based on Serverless Architecture
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
 
NoSQL Revolution: Under the Covers of Distributed Systems at Scale (SPOT401) ...
NoSQL Revolution: Under the Covers of Distributed Systems at Scale (SPOT401) ...NoSQL Revolution: Under the Covers of Distributed Systems at Scale (SPOT401) ...
NoSQL Revolution: Under the Covers of Distributed Systems at Scale (SPOT401) ...
 
AWS Summit Singapore Opening Keynote
AWS Summit Singapore Opening Keynote AWS Summit Singapore Opening Keynote
AWS Summit Singapore Opening Keynote
 
"Design First" APIs with Swagger
"Design First" APIs with Swagger"Design First" APIs with Swagger
"Design First" APIs with Swagger
 
Getting Buzzed on Buzzwords: Using Cloud & Big Data to Pentest at Scale
Getting Buzzed on Buzzwords: Using Cloud & Big Data to Pentest at ScaleGetting Buzzed on Buzzwords: Using Cloud & Big Data to Pentest at Scale
Getting Buzzed on Buzzwords: Using Cloud & Big Data to Pentest at Scale
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
 
AWS DevOps Event - Innovating with DevOps on AWS
AWS DevOps Event - Innovating with DevOps on AWSAWS DevOps Event - Innovating with DevOps on AWS
AWS DevOps Event - Innovating with DevOps on AWS
 
Announcing AWS Step Functions - December 2016 Monthly Webinar Series
Announcing AWS Step Functions - December 2016 Monthly Webinar SeriesAnnouncing AWS Step Functions - December 2016 Monthly Webinar Series
Announcing AWS Step Functions - December 2016 Monthly Webinar Series
 
AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenches
 
Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)
 
Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)
 
Surviving Hadoop on AWS
Surviving Hadoop on AWSSurviving Hadoop on AWS
Surviving Hadoop on AWS
 
Netflix OSS Meetup Season 5 Episode 1
Netflix OSS Meetup Season 5 Episode 1Netflix OSS Meetup Season 5 Episode 1
Netflix OSS Meetup Season 5 Episode 1
 
ENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million usersENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million users
 
AWS re:Invent 2016| HLC301 | Data Science and Healthcare: Running Large Scale...
AWS re:Invent 2016| HLC301 | Data Science and Healthcare: Running Large Scale...AWS re:Invent 2016| HLC301 | Data Science and Healthcare: Running Large Scale...
AWS re:Invent 2016| HLC301 | Data Science and Healthcare: Running Large Scale...
 
Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)
 
Stockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless ChallengesStockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless Challenges
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Serverless Ops: What do we do when the server goes away?