SlideShare a Scribd company logo
Large Scale Production Applications
Taking Akka Streams & Akka HTTP to
Akara Sucharitakul, PayPal
Why Akka
Streams???
High performance, pure async,
stream processing
Conforms to reactive streams
Simple, yet powerful GraphDSL
allows clear stream topology
declaration
Unifying construct in processing
pipeline
Operationalizing your Service
• Service Lifecycle
• Pipelines
• Gates
Monitoring your Service
Now, eat your cake, too!
Operationalization Infrastructure
Production at Scale… Production What???
• One service is no service
• Services never come alone, they come in
flocks, herds, domains, organizations
• Services come in different platforms,
implementation languages, technologies
• To be manageable in the big scheme of
things, they have to walk like a duck and
quack like a duck
• Three basic requirement sets for
services:
• Service Lifecycle
• Manageability
• Resiliency
Service Lifecycle Requirements
• Observing and acting upon service instance
state changes
• Exposing lifecycle state to external
infrastructure
• Manage internal state transitions without data
loss
Manageability Requirements
• Logging
• Uniformity of logs across services
• Monitoring
• Collect metrics, consistently across
services and technologies
• Tracing/Correlation
• Within services
• Across services
• Troubleshooting
• Log bad requests
• Log timeouts
• Intrusion detection
• Suspicious calls
• Metering
• How many times are you allowed to call
• Authentication
• Organization’s policies and mechanisms
• Authorization
• Organization’s policies and mechanisms
Resiliency Requirements
• End-to-end back-pressure
• Timeouts
• Retries
• Circuit breakers
A Simple End-to-End HTTP Stream
Re
q
Res
p
Re
q
Res
p
End-to-End Streams
Why???
Provides back-pressure through all
the components
No known places like unbounded
buffers or mailboxes to OOM
Process what you can take
End-to-End Streams, End-to-End
Resiliency
Managing the Service Lifecycle
• Extended Content Verification (ECV)
• Enables/disables load balancer traffic
• Provided through admin UI
• Traffic enabled when “Active”
• Perpetual Stream
• Starts when ”Active”
• Stops incoming and drains stream at
“Stopping”
• Stopping is the hard part
• Without losing data in async systems
Starting
Active
Stopping
Stopped
The Pipeline
• Provided by Infra, not part of application logic
• Application can override/add/remove
• Separation of concerns
• Allows standardization of request/response handling across large number of applications
• Similar architecture for client and server side
• Pipeline components:
BidiFlow[RequestContext, RequestContext, RequestContext, RequestContext, NotUsed]
RequestContext: [Request, Option[Try[Response]], Attributes]
• Allows processing request, response, or even short-cutting the request from biz logic
• Pipeline assembly by putting BidiFlow components together (atop)
• Fully utilizes Akka Streams fusing
Server-Side Pipeline
Re
q
Res
p
Pipelin
e
Client-Side Pipeline
Re
q
Res
p
Pipelin
e
Composite
Client
Common
Pipeline Components
Logging
Monitoring
Tracing/Correlation
Request/Response Capture
(Troubleshooting)
Intrusion Detection
Authn/Authz
Stage Gates Separates one part of flow from another
Synchronous internal state
Custom BidiFlow keeps the gate’s state
synchronous and encapsulated
Best known implementation of
resiliency components
Can be used as pipeline component
Gated Flow
Main
Flow
Gated
Flow
Gat
e
Common Gates
Circuit
Breaker
Timeout Retry
Monitor
Counters
• Lag
• Message
Loss
• In/out Ratio
State Sharing Some gates share state
Gates to shared resource
• Shared local/remote actor
• Shared service/database
Create explicit state holder like
CircuitBreakerState
Share state holder between
materializations
Monitoring Akka HTTP Services
What to Monitor
• Requests rate
• Open Connections – current number of active stream materializations
• New Connection rate – HTTP stream materialization rate
• In-flight requests
• Stream collapses, and reasons – Client dropping connections, etc.
• Http response codes
• Standard system and network statistics
Monitoring Internet-facing services
• Akka HTTP is not the most tolerant
• Routing API makes even stricter assumptions about the
requests
• Pipeline handlers for internet-facing services:
• Request sanitizer – also capture stats on non-compliant requests
• Request logger – capture requests that failed the sanitize
Be tolerant with others and strict with yourself
Now, eat your cake, too!
squbs is not… A framework by its own
A programming model – use Akka
All or nothing – Components/patterns
can mostly be used independently
squbs
Akka for large
scale deployments
Bootstrap
Lifecycle management
Loosely-coupled module system
Integration hooks for logging,
monitoring, ops integration
squbs
Akka for large
scale deployments
JSON console
HttpClient with pluggable resolver and
monitoring/logging hooks
Test tools and interfaces
Goodies:
- Activators and G8 templates
for Scala & Java
- Programming patterns and helpers for
Akka and Akka Stream Use cases…, and
growing
squbs Components available on Alpakka
PersistentBuffer
BroadcastBuffer
Stream Circuit Breaker
Stream Deduplicator
Stream Timeout
Stream Retry
http://developer.lightbend.com/docs/alpakka/current/external-components.html
What’s Next? squbs 1.0 – on Akka 2.5, Scala 2.12
Refined documentation & API
More goodies, components
Better monitoring & stats
Beyond squbs 1.0 – Operationalizing
distributed patterns at large scale!!!
Summary
• Akka Streams & Akka HTTP for high throughput, high burst services
• Resilient: Back-pressure keeps system stable under load
• Operationalization is a big deal!
• Provide the right hooks and tools to understand a running system
• Lifecycle hooks and pipeline allow standards and separation of concern
• Resiliency gates/components essential to building resilient systems
• squbs: Eat your cake, too!
• Functionality without sacrificing performance
• Provides operationalization hooks and components for Akka HTTP/Akka
Streams
Q&A – Feedback Appreciated
Join us on – link from https://github.com/paypal/squbs
@squbs, @S_Akara
Taking Akka Streams & Akka Http to Large Scale Production Applications

More Related Content

What's hot

Apache Ambari Meetup at Dataworks Summit 2017
Apache Ambari Meetup at Dataworks Summit 2017Apache Ambari Meetup at Dataworks Summit 2017
Apache Ambari Meetup at Dataworks Summit 2017
Alejandro Fernandez
 
Integrating Apache NiFi and Apache Apex
Integrating Apache NiFi and Apache Apex Integrating Apache NiFi and Apache Apex
Integrating Apache NiFi and Apache Apex
Apache Apex
 
Hadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-Designer
Hadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-DesignerHadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-Designer
Hadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-Designer
Srikanth Sundarrajan
 
Nov 2015 Webinar: Introduction to FileCatalyst v3.6
Nov 2015 Webinar: Introduction to FileCatalyst v3.6Nov 2015 Webinar: Introduction to FileCatalyst v3.6
Nov 2015 Webinar: Introduction to FileCatalyst v3.6
FileCatalyst
 
Sma, the hybrid provisioning engine for public clouds
Sma, the hybrid provisioning engine for public cloudsSma, the hybrid provisioning engine for public clouds
Sma, the hybrid provisioning engine for public clouds
Stijn Callebaut
 
Building REST API using Akka HTTP with Scala
Building REST API using Akka HTTP with ScalaBuilding REST API using Akka HTTP with Scala
Building REST API using Akka HTTP with Scala
Knoldus Inc.
 
Network Virtualization for the Enterprise Data Center
Network Virtualization for the Enterprise Data CenterNetwork Virtualization for the Enterprise Data Center
Network Virtualization for the Enterprise Data Center
Open Networking Summits
 
(Past), Present, and Future of Apache Flink
(Past), Present, and Future of Apache Flink(Past), Present, and Future of Apache Flink
(Past), Present, and Future of Apache Flink
Aljoscha Krettek
 
FileCatalyst Webinar featuring Forbidden
FileCatalyst Webinar featuring ForbiddenFileCatalyst Webinar featuring Forbidden
FileCatalyst Webinar featuring Forbidden
FileCatalyst
 
Apache Flink Online Training
Apache Flink Online TrainingApache Flink Online Training
Apache Flink Online Training
Learntek1
 
Sqlwatch presentation 2018-11
Sqlwatch presentation 2018-11Sqlwatch presentation 2018-11
Sqlwatch presentation 2018-11
Marcin Gminski
 
Siebel monitoring
Siebel monitoringSiebel monitoring
Siebel monitoring
Sarnindar Purewal
 
Apache Apex - Hadoop Users Group
Apache Apex - Hadoop Users GroupApache Apex - Hadoop Users Group
Apache Apex - Hadoop Users Group
Pramod Immaneni
 
Effective Service Mesh to turbocharge Cloud Resiliency
Effective Service Mesh to turbocharge Cloud ResiliencyEffective Service Mesh to turbocharge Cloud Resiliency
Effective Service Mesh to turbocharge Cloud Resiliency
Liang Gang Yu
 
Stream data from Apache Kafka for processing with Apache Apex
Stream data from Apache Kafka for processing with Apache ApexStream data from Apache Kafka for processing with Apache Apex
Stream data from Apache Kafka for processing with Apache Apex
Apache Apex
 
Apache kafka- Onkar Kadam
Apache kafka- Onkar KadamApache kafka- Onkar Kadam
Apache kafka- Onkar Kadam
Onkar Kadam
 
Explaining the FileCatalyst Adobe Integration
Explaining the FileCatalyst Adobe IntegrationExplaining the FileCatalyst Adobe Integration
Explaining the FileCatalyst Adobe Integration
FileCatalyst
 

What's hot (19)

Apache Ambari Meetup at Dataworks Summit 2017
Apache Ambari Meetup at Dataworks Summit 2017Apache Ambari Meetup at Dataworks Summit 2017
Apache Ambari Meetup at Dataworks Summit 2017
 
Scale net apps in aws
Scale net apps in awsScale net apps in aws
Scale net apps in aws
 
Integrating Apache NiFi and Apache Apex
Integrating Apache NiFi and Apache Apex Integrating Apache NiFi and Apache Apex
Integrating Apache NiFi and Apache Apex
 
Hadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-Designer
Hadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-DesignerHadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-Designer
Hadoop-Summit-2014-Apache-Falcon-Hadoop-First-ETL-Pipeline-Designer
 
Nov 2015 Webinar: Introduction to FileCatalyst v3.6
Nov 2015 Webinar: Introduction to FileCatalyst v3.6Nov 2015 Webinar: Introduction to FileCatalyst v3.6
Nov 2015 Webinar: Introduction to FileCatalyst v3.6
 
Sma, the hybrid provisioning engine for public clouds
Sma, the hybrid provisioning engine for public cloudsSma, the hybrid provisioning engine for public clouds
Sma, the hybrid provisioning engine for public clouds
 
Building REST API using Akka HTTP with Scala
Building REST API using Akka HTTP with ScalaBuilding REST API using Akka HTTP with Scala
Building REST API using Akka HTTP with Scala
 
Network Virtualization for the Enterprise Data Center
Network Virtualization for the Enterprise Data CenterNetwork Virtualization for the Enterprise Data Center
Network Virtualization for the Enterprise Data Center
 
(Past), Present, and Future of Apache Flink
(Past), Present, and Future of Apache Flink(Past), Present, and Future of Apache Flink
(Past), Present, and Future of Apache Flink
 
FileCatalyst Webinar featuring Forbidden
FileCatalyst Webinar featuring ForbiddenFileCatalyst Webinar featuring Forbidden
FileCatalyst Webinar featuring Forbidden
 
Apache Flink Online Training
Apache Flink Online TrainingApache Flink Online Training
Apache Flink Online Training
 
Sqlwatch presentation 2018-11
Sqlwatch presentation 2018-11Sqlwatch presentation 2018-11
Sqlwatch presentation 2018-11
 
Siebel monitoring
Siebel monitoringSiebel monitoring
Siebel monitoring
 
Apache Apex - Hadoop Users Group
Apache Apex - Hadoop Users GroupApache Apex - Hadoop Users Group
Apache Apex - Hadoop Users Group
 
Effective Service Mesh to turbocharge Cloud Resiliency
Effective Service Mesh to turbocharge Cloud ResiliencyEffective Service Mesh to turbocharge Cloud Resiliency
Effective Service Mesh to turbocharge Cloud Resiliency
 
Stream data from Apache Kafka for processing with Apache Apex
Stream data from Apache Kafka for processing with Apache ApexStream data from Apache Kafka for processing with Apache Apex
Stream data from Apache Kafka for processing with Apache Apex
 
Apache kafka- Onkar Kadam
Apache kafka- Onkar KadamApache kafka- Onkar Kadam
Apache kafka- Onkar Kadam
 
Explaining the FileCatalyst Adobe Integration
Explaining the FileCatalyst Adobe IntegrationExplaining the FileCatalyst Adobe Integration
Explaining the FileCatalyst Adobe Integration
 
Taskflow
TaskflowTaskflow
Taskflow
 

Similar to Taking Akka Streams & Akka Http to Large Scale Production Applications

A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
Legacy Typesafe (now Lightbend)
 
Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...
Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...
Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...
confluent
 
Service quality monitoring system architecture
Service quality monitoring system architectureService quality monitoring system architecture
Service quality monitoring system architecture
Matsuo Sawahashi
 
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Lohika_Odessa_TechTalks
 
Tech talk microservices debugging
Tech talk microservices debuggingTech talk microservices debugging
Tech talk microservices debugging
Andrey Kolodnitsky
 
Intro to Apache Apex @ Women in Big Data
Intro to Apache Apex @ Women in Big DataIntro to Apache Apex @ Women in Big Data
Intro to Apache Apex @ Women in Big Data
Apache Apex
 
Service Stampede: Surviving a Thousand Services
Service Stampede: Surviving a Thousand ServicesService Stampede: Surviving a Thousand Services
Service Stampede: Surviving a Thousand Services
Anil Gursel
 
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lightbend
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric
Davide Benvegnù
 
Event Driven Architectures with Apache Kafka
Event Driven Architectures with Apache KafkaEvent Driven Architectures with Apache Kafka
Event Driven Architectures with Apache Kafka
Matt Masuda
 
Transforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web ServicesTransforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web Services
Adam Takvam
 
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
Prolifics
 
From the Trenches: Effectively Scaling Your Cloud Infrastructure and Optimizi...
From the Trenches: Effectively Scaling Your Cloud Infrastructure and Optimizi...From the Trenches: Effectively Scaling Your Cloud Infrastructure and Optimizi...
From the Trenches: Effectively Scaling Your Cloud Infrastructure and Optimizi...
Allan Mangune
 
Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?
Orkhan Gasimov
 
Resilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes BackResilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes Back
C4Media
 
Microsoft Azure and Windows Application monitoring
Microsoft Azure and Windows Application monitoringMicrosoft Azure and Windows Application monitoring
Microsoft Azure and Windows Application monitoring
Site24x7
 
Netflix Cloud Platform and Open Source
Netflix Cloud Platform and Open SourceNetflix Cloud Platform and Open Source
Netflix Cloud Platform and Open Source
aspyker
 
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...
Flink Forward San Francisco 2018:  Dave Torok & Sameer Wadkar - "Embedding Fl...Flink Forward San Francisco 2018:  Dave Torok & Sameer Wadkar - "Embedding Fl...
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...
Flink Forward
 
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
Lucas Jellema
 
The Oracle Application Container Cloud as the Microservices Platform (APAC OU...
The Oracle Application Container Cloud as the Microservices Platform (APAC OU...The Oracle Application Container Cloud as the Microservices Platform (APAC OU...
The Oracle Application Container Cloud as the Microservices Platform (APAC OU...
Lucas Jellema
 

Similar to Taking Akka Streams & Akka Http to Large Scale Production Applications (20)

A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
 
Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...
Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...
Kafka: Journey from Just Another Software to Being a Critical Part of PayPal ...
 
Service quality monitoring system architecture
Service quality monitoring system architectureService quality monitoring system architecture
Service quality monitoring system architecture
 
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...
 
Tech talk microservices debugging
Tech talk microservices debuggingTech talk microservices debugging
Tech talk microservices debugging
 
Intro to Apache Apex @ Women in Big Data
Intro to Apache Apex @ Women in Big DataIntro to Apache Apex @ Women in Big Data
Intro to Apache Apex @ Women in Big Data
 
Service Stampede: Surviving a Thousand Services
Service Stampede: Surviving a Thousand ServicesService Stampede: Surviving a Thousand Services
Service Stampede: Surviving a Thousand Services
 
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
Lessons Learned From PayPal: Implementing Back-Pressure With Akka Streams And...
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric
 
Event Driven Architectures with Apache Kafka
Event Driven Architectures with Apache KafkaEvent Driven Architectures with Apache Kafka
Event Driven Architectures with Apache Kafka
 
Transforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web ServicesTransforming Legacy Applications Into Dynamically Scalable Web Services
Transforming Legacy Applications Into Dynamically Scalable Web Services
 
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
 
From the Trenches: Effectively Scaling Your Cloud Infrastructure and Optimizi...
From the Trenches: Effectively Scaling Your Cloud Infrastructure and Optimizi...From the Trenches: Effectively Scaling Your Cloud Infrastructure and Optimizi...
From the Trenches: Effectively Scaling Your Cloud Infrastructure and Optimizi...
 
Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?
 
Resilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes BackResilience Planning & How the Empire Strikes Back
Resilience Planning & How the Empire Strikes Back
 
Microsoft Azure and Windows Application monitoring
Microsoft Azure and Windows Application monitoringMicrosoft Azure and Windows Application monitoring
Microsoft Azure and Windows Application monitoring
 
Netflix Cloud Platform and Open Source
Netflix Cloud Platform and Open SourceNetflix Cloud Platform and Open Source
Netflix Cloud Platform and Open Source
 
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...
Flink Forward San Francisco 2018:  Dave Torok & Sameer Wadkar - "Embedding Fl...Flink Forward San Francisco 2018:  Dave Torok & Sameer Wadkar - "Embedding Fl...
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...
 
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
 
The Oracle Application Container Cloud as the Microservices Platform (APAC OU...
The Oracle Application Container Cloud as the Microservices Platform (APAC OU...The Oracle Application Container Cloud as the Microservices Platform (APAC OU...
The Oracle Application Container Cloud as the Microservices Platform (APAC OU...
 

Recently uploaded

OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 

Recently uploaded (20)

OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 

Taking Akka Streams & Akka Http to Large Scale Production Applications

  • 1. Large Scale Production Applications Taking Akka Streams & Akka HTTP to Akara Sucharitakul, PayPal
  • 2. Why Akka Streams??? High performance, pure async, stream processing Conforms to reactive streams Simple, yet powerful GraphDSL allows clear stream topology declaration Unifying construct in processing pipeline
  • 3. Operationalizing your Service • Service Lifecycle • Pipelines • Gates Monitoring your Service Now, eat your cake, too!
  • 5. Production at Scale… Production What??? • One service is no service • Services never come alone, they come in flocks, herds, domains, organizations • Services come in different platforms, implementation languages, technologies • To be manageable in the big scheme of things, they have to walk like a duck and quack like a duck • Three basic requirement sets for services: • Service Lifecycle • Manageability • Resiliency
  • 6. Service Lifecycle Requirements • Observing and acting upon service instance state changes • Exposing lifecycle state to external infrastructure • Manage internal state transitions without data loss
  • 7. Manageability Requirements • Logging • Uniformity of logs across services • Monitoring • Collect metrics, consistently across services and technologies • Tracing/Correlation • Within services • Across services • Troubleshooting • Log bad requests • Log timeouts • Intrusion detection • Suspicious calls • Metering • How many times are you allowed to call • Authentication • Organization’s policies and mechanisms • Authorization • Organization’s policies and mechanisms
  • 8. Resiliency Requirements • End-to-end back-pressure • Timeouts • Retries • Circuit breakers
  • 9. A Simple End-to-End HTTP Stream Re q Res p Re q Res p
  • 10. End-to-End Streams Why??? Provides back-pressure through all the components No known places like unbounded buffers or mailboxes to OOM Process what you can take End-to-End Streams, End-to-End Resiliency
  • 11. Managing the Service Lifecycle • Extended Content Verification (ECV) • Enables/disables load balancer traffic • Provided through admin UI • Traffic enabled when “Active” • Perpetual Stream • Starts when ”Active” • Stops incoming and drains stream at “Stopping” • Stopping is the hard part • Without losing data in async systems Starting Active Stopping Stopped
  • 12. The Pipeline • Provided by Infra, not part of application logic • Application can override/add/remove • Separation of concerns • Allows standardization of request/response handling across large number of applications • Similar architecture for client and server side • Pipeline components: BidiFlow[RequestContext, RequestContext, RequestContext, RequestContext, NotUsed] RequestContext: [Request, Option[Try[Response]], Attributes] • Allows processing request, response, or even short-cutting the request from biz logic • Pipeline assembly by putting BidiFlow components together (atop) • Fully utilizes Akka Streams fusing
  • 16. Stage Gates Separates one part of flow from another Synchronous internal state Custom BidiFlow keeps the gate’s state synchronous and encapsulated Best known implementation of resiliency components Can be used as pipeline component
  • 19. State Sharing Some gates share state Gates to shared resource • Shared local/remote actor • Shared service/database Create explicit state holder like CircuitBreakerState Share state holder between materializations
  • 21. What to Monitor • Requests rate • Open Connections – current number of active stream materializations • New Connection rate – HTTP stream materialization rate • In-flight requests • Stream collapses, and reasons – Client dropping connections, etc. • Http response codes • Standard system and network statistics
  • 22. Monitoring Internet-facing services • Akka HTTP is not the most tolerant • Routing API makes even stricter assumptions about the requests • Pipeline handlers for internet-facing services: • Request sanitizer – also capture stats on non-compliant requests • Request logger – capture requests that failed the sanitize Be tolerant with others and strict with yourself
  • 23. Now, eat your cake, too!
  • 24. squbs is not… A framework by its own A programming model – use Akka All or nothing – Components/patterns can mostly be used independently
  • 25. squbs Akka for large scale deployments Bootstrap Lifecycle management Loosely-coupled module system Integration hooks for logging, monitoring, ops integration
  • 26. squbs Akka for large scale deployments JSON console HttpClient with pluggable resolver and monitoring/logging hooks Test tools and interfaces Goodies: - Activators and G8 templates for Scala & Java - Programming patterns and helpers for Akka and Akka Stream Use cases…, and growing
  • 27. squbs Components available on Alpakka PersistentBuffer BroadcastBuffer Stream Circuit Breaker Stream Deduplicator Stream Timeout Stream Retry http://developer.lightbend.com/docs/alpakka/current/external-components.html
  • 28. What’s Next? squbs 1.0 – on Akka 2.5, Scala 2.12 Refined documentation & API More goodies, components Better monitoring & stats Beyond squbs 1.0 – Operationalizing distributed patterns at large scale!!!
  • 29. Summary • Akka Streams & Akka HTTP for high throughput, high burst services • Resilient: Back-pressure keeps system stable under load • Operationalization is a big deal! • Provide the right hooks and tools to understand a running system • Lifecycle hooks and pipeline allow standards and separation of concern • Resiliency gates/components essential to building resilient systems • squbs: Eat your cake, too! • Functionality without sacrificing performance • Provides operationalization hooks and components for Akka HTTP/Akka Streams
  • 30. Q&A – Feedback Appreciated Join us on – link from https://github.com/paypal/squbs @squbs, @S_Akara