66
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Dr. Tim Wagner, General Manager, AWS Lambda and Amazon API Gateway December 1, 2016 Serverless Computing Mini Con State of the Union

AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Embed Size (px)

Citation preview

Page 1: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Dr. Tim Wagner, General Manager, AWS Lambda and Amazon API Gateway

December 1, 2016

Serverless Computing Mini Con

State of the Union

Page 2: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Agenda

Page 3: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

What is

serverless?

Build and run applications

without thinking about servers

Page 4: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Let’s take a look at the evolution of computing

Physical servers

in datacenters

Virtual servers

in datacenters

Virtual servers

in the cloud

Page 5: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Each progressive step was better

Physical Servers

Datacenters

Virtual Servers

Datacenters

• Higher utilization

• Faster provisioning speed

• Improved uptime

• Disaster recovery

• Hardware independence

• Trade CAPEX for OPEX

• More scale

• Elastic resources

• Faster speed and agility

• Reduced maintenance

• Better availability and fault

tolerance

Virtual servers

in the cloud

Page 6: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

But there are still limitations

Physical Servers

Datacenters

Virtual Servers

Datacenters

• Trade CAPEX for OPEX

• More scale

• Elastic resources

• Faster speed and agility

• Reduced maintenance

• Better availability and fault

tolerance

• Still need to administer

virtual servers

• Still need to manage

capacity and utilization

• Still need to size

workloads

• Still need to manage

availability, fault tolerance

• Still expensive to run

intermittent jobs

Virtual servers

in the cloud

Page 7: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Evolving

to serverlessSERVERLESS

Virtual servers

in the cloud

Physical servers

in datacenters

Virtual servers

in datacenters

Page 8: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

No server is easier to manage than no server

All of these responsibilities

go away

Provisioning and utilization

Availability and fault tolerance

Scaling

Operations and management

Page 9: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

EVENT DRIVEN CONTINUOUS SCALING PAY BY USAGE

Deliver on demand, never pay for idle

Page 10: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Building blocks for serverless applications

AWS Lambda Amazon DynamoDB

Amazon SNS

Amazon API GatewayAmazon SQS

Amazon Kinesis

Amazon S3

Orchestration and State Management

API Proxy Messaging and Queues Analytics

Monitoring and Debugging

Compute Storage Database

AWS X-RayAWS Step Functions

Page 11: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Serverless changes how you deliver

Speeds up

time to market

Dedicated time

to innovation

Increases developer

productivity

Eliminates operational

complexity

Page 12: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Serverless today

Page 13: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Chatbots

• Powering

chatbot logic

Amazon

Alexa

• Powering

voice-enabled

apps

• Alexa Skills Kit

Common use cases

Web

applications

• Static

websites

• Dynamic

web apps

• Packages for

Flask and

Express

Data

processing

• Real time

• MapReduce

• Batch

Back ends

• Apps &

services

• Mobile

• IoT

</></>

Page 14: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Customers innovating with serverless

Page 15: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Enterprises are achieving massive scale with Lambda

• Thomson Reuters processes 4,000 requests per second

• FINRA processes half a trillion validations of stock trades daily

• Hearst reduced the time to ingest and process data for its

analytics pipeline by 97%

• Vevo can handle spikes of 80x normal traffic

• Expedia triggers 1.2 billion Lambda requests each month

Page 16: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Content services

• Re-architected the platform from the ground up

• Uses microservices architecture

• Can handle spikes of up to 80x normal traffic

Serverless powers Vevo’s critical applications

Page 17: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Data services

• Built its data platform starting from zero

• Serverless architecture: AWS Lambda, Amazon Kinesis, Amazon Redshift, Amazon DynamoDB, Amazon S3, etc.

• New platform went into production in <12 months

Serverless powers Vevo’s critical applications

Page 18: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

FINRA

Page 19: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Tim Griesbach - Senior Director, FINRA

December 1, 2016

SVR311

How We Perform ½ Trillion Validations Daily

Serverless Computing at FINRA

Page 20: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

3

Page 21: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

4

Page 22: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

It’s more than just ½ Trillion validations…

Volume Varies

Daily & Hourly

• Driven by world events in financial, government, etc.

• Hourly volume varies; max of 75B elements per hour

• Daily volume can vary 2-3x due to market events

Validation

rules expand

over time

• Data must meet a defined specification

• SEC/FINRA adding/reviewing rules regularly

• >200 rules today; >100+ derivations

SLA

Expectations

Don’t Change

• Timely feedback so data can be corrected to meet SLA

• Invalid or late data = $$ fines

5

Page 23: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Traditional on premise solution

• Static Hadoop Cluster, processing files in batches

• Required to be available 24/5

• Map-only job scheduled every 10 minutes

On premise data center

NAS

DB

FTPIncoming

Files

6

Page 24: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Challenges with our on premise solution

• Not easily scalable = sized for peak demand

• Idle 50% of time

• Higher costs

• Required ongoing costly server/software maintenance

• Originally designed for batch processing

7

Page 25: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Goals for our new solution

• Support volume spikes on-demand

• Get out of infrastructure management

• Don’t pay for peak all the time, pay for what we use

• Can we improve the time of availability of data

8

Page 26: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Selecting Technology

Technologies Considered

• AWS Lambda

• Apache Ignite / EC2

• Spark / EMR

Evaluation Process

• Define criteria

• Create POC to validate

Selection Criteria

• Scalability

• Security

• Data Partitioning

• Monitoring

• Performance

• Cost

• Maintenance

9

Page 27: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Our Serverless Cloud Solution

10

Page 28: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Lambda centered AWS Solution

• Validator implemented using

Lambda

• Queues provide input/output

notification from system

• Controller manages data

feeds into Lambda and

notifications out of Lambda

• Data on S3 in Herd

On premise data center

NASFTP

Incoming

Files

Validation

Lambda Account

Controller

Consumer

11

Page 29: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Our Results – Faster, Cheaper, More Scalable

• Reduced cost, only pay for what we use• Reduce by over 50%

• Processing times have been reduced• Goal is regardless of volume, any file avail in <1m

• Errors handled on a finer grained basis

• Horizontal scaling improved

• We have seen volume spikes >3x with no impact

• Less infrastructure to manage

12

Page 30: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

FINRA’s Future Plans

• Eliminate the EC2 based controller

• Considering for other ETL processing within FINRA

• Rethink how we can use Lambda for other applications

• Continue push to provide near real-time throughput

17

Page 31: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Thank you!

Page 32: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Serverless is a core component of modern apps

Page 33: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

AWS: The Complete Serverless Platform

Page 34: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Capabilities of a

serverless platform

Page 35: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Cloud logic layer

Page 36: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

NEW

Cloud logic layer

C#

C# language support

• Powered by .NET Core 1.0 release

• Supports functions packaged as DLLs

• Built in support for NuGet packages

• Author and deploy C# functions using Visual

Studio to AWS Lambda

Page 37: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

NEW

Cloud logic layer

Amazon API Gateway

binary encoding• Serve images, audio, video or other binary

data through APIs

• Encode to Base64 or decode to binary

• Automatic encoding to Base64 for AWS

Lambda functions

Page 38: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

NEW

Cloud logic layer

Amazon API Gateway

documentation generation• Document your APIs for better developer

experience

• Support for documentation per Swagger

specifications

• Support for separate workflows – tech writer vs API

developer

Page 39: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

NEW

Cloud logic layer

Amazon Lex

• Chatbots for Facebook and AWS Mobile Hub

• Powered by the same technology as Alexa

• Efficient and intuitive tools to build

conversations

• Scales automatically

• Connects to enterprise systems

• Slack and Twilio integration coming soon

Page 40: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Responsive data sources

Page 41: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Lambda event sources – AWS services

Amazon API Gateway

Amazon S3

Amazon DynamoDB

Amazon Aurora

Amazon Simple Notification Service

Amazon Simple Email Service

Amazon Cognito

Amazon CloudWatch

Amazon Kinesis Streams

AWS CodeCommit

AWS CloudFormation

AWS Config

Amazon Lex

Page 42: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Integrations library

Page 43: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

NEW

Integrations library

Amazon API Gateway listings in

the AWS Marketplace

Page 44: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Reliability and performance

Page 45: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

NEW

Reliability and performance

Dead Letter Queues

• Automatically capture events after

exhausting retries

• Build even more reliable event processing

applications

• Target Amazon SQS queues or Amazon

SNS topics

Page 46: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Application modeling framework

Monolithic

application

Microservices

Page 47: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

But what happens

when you have an

entire app made up

of many functions?

Composing serverless applications

Page 48: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Meet SAM

Page 49: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

AWS Serverless Application Model (SAM)

Standard model for

representing serverless

applications on AWS

Functions, APIs, event

sources, and data stores

Simplifies deployment and

management for serverless

applications

Page 50: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

AWS Serverless Application Model (SAM)

• Natively supported by AWS

CloudFormation

• Export any function as a SAM

template

• Package and deploy SAM

templates using AWS CLI

• Open spec under Apache 2.0

for community extensions

Page 51: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Developer ecosystem — AWS

</>

AWS CodePipeline + SAM

GitHub

Amazon S3

AWS CodeCommit

AWS CodeBuild AWS CodeBuild

third-party tools

AWS CloudFormation

Commit Build TestDeploy

to Prod

Page 52: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Developer ecosystem — AWS

How do you debug distributed applications

made of multiple functions or services?

How do you gain insights into how your

functions are performing or behaving?

Page 53: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Introducing AWS X-Ray (in preview)

• Analyze and debug distributed

apps in production

• Visualize service call graph of

your app

• Identify performance

bottlenecks and errors

• Pinpoint service-specific issues

• Identify impact of issues on

users of the app

• Lambda support coming soon

Page 54: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Developer ecosystem

Write

code

Deploy to

customer

Build

and test

Receive

feedback

Page 55: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Developer ecosystem — commercial

MonitoringDeploymentIntegrationsCode libraries APN skills

Page 56: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Developer ecosystem — open source

Chalice

Framework

Page 57: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Orchestration and state management

Page 58: AWS re:Invent 2016: The State of Serverless Computing (SVR311)
Page 59: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

1. A concept used by

CompSci profs for

torturing undergrads,

full of arcane math

2. A practical way to build

and manage modern

serverless apps

“State machine” (noun)

Page 60: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

“I want to sequence functions”

“I want to call functions based on data”

“I want more control over retries”

“I want try/catch/finally”

“I have a workflow that runs for hours”

“I want to run functions in parallel”

Orchestration and state management

Page 61: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Introducing AWS Step Functions

Run cloud state machines

Coordinate components of multi-

step apps

Visualize application as a series of

steps

Handles thousands of workflows

and millions of simultaneous steps

Page 62: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Lambda everywhere

We’ve expanded our

coverage to most

major regions in the

AWS global

infrastructure

Page 63: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Introducing Lambda@Edge (in preview)

Lambda is now available in

all Amazon CloudFront

edge locations

• Low-latency

request/response

customization

• Supporters viewer and

origin events

Page 64: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Introducing AWS Greengrass (in preview)

• Extends AWS processing on devices

• Low latency, near-real time

Page 65: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Serverless is a

fundamental

component of

modern

applications

Page 66: AWS re:Invent 2016: The State of Serverless Computing (SVR311)

Conclusion

Lambda is a fundamental

component of modern

application architectures

It has a place in everything

from data processing to

simple web apps