SlideShare uma empresa Scribd logo
1 de 55
Baixar para ler offline
@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

Mais conteúdo relacionado

Semelhante 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
 

Semelhante 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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Ú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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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?
 
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
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

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