SlideShare uma empresa Scribd logo
1 de 31
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
Large Scale Production Applications with Akka Streams & Akka HTTP

Mais conteúdo relacionado

Mais procurados

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 2017Alejandro 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-DesignerSrikanth 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.6FileCatalyst
 
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 cloudsStijn 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 ScalaKnoldus 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 CenterOpen 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 FlinkAljoscha Krettek
 
FileCatalyst Webinar featuring Forbidden
FileCatalyst Webinar featuring ForbiddenFileCatalyst Webinar featuring Forbidden
FileCatalyst Webinar featuring ForbiddenFileCatalyst
 
Apache Flink Online Training
Apache Flink Online TrainingApache Flink Online Training
Apache Flink Online TrainingLearntek1
 
Sqlwatch presentation 2018-11
Sqlwatch presentation 2018-11Sqlwatch presentation 2018-11
Sqlwatch presentation 2018-11Marcin Gminski
 
Apache Apex - Hadoop Users Group
Apache Apex - Hadoop Users GroupApache Apex - Hadoop Users Group
Apache Apex - Hadoop Users GroupPramod 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 ResiliencyLiang 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 ApexApache Apex
 
Apache kafka- Onkar Kadam
Apache kafka- Onkar KadamApache kafka- Onkar Kadam
Apache kafka- Onkar KadamOnkar Kadam
 
Explaining the FileCatalyst Adobe Integration
Explaining the FileCatalyst Adobe IntegrationExplaining the FileCatalyst Adobe Integration
Explaining the FileCatalyst Adobe IntegrationFileCatalyst
 

Mais procurados (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
 

Semelhante a Large Scale Production Applications with Akka Streams & Akka HTTP

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.0Legacy 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 architectureMatsuo 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 debuggingAndrey 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 DataApache Apex
 
Service Stampede: Surviving a Thousand Services
Service Stampede: Surviving a Thousand ServicesService Stampede: Surviving a Thousand Services
Service Stampede: Surviving a Thousand ServicesAnil 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 FabricDavide Benvegnù
 
Event Driven Architectures with Apache Kafka
Event Driven Architectures with Apache KafkaEvent Driven Architectures with Apache Kafka
Event Driven Architectures with Apache KafkaMatt 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 ServicesAdam 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 BackC4Media
 
Microsoft Azure and Windows Application monitoring
Microsoft Azure and Windows Application monitoringMicrosoft Azure and Windows Application monitoring
Microsoft Azure and Windows Application monitoringSite24x7
 
Netflix Cloud Platform and Open Source
Netflix Cloud Platform and Open SourceNetflix Cloud Platform and Open Source
Netflix Cloud Platform and Open Sourceaspyker
 
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
 

Semelhante a Large Scale Production Applications with Akka Streams & Akka HTTP (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...
 

Último

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 

Último (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 

Large Scale Production Applications with Akka Streams & Akka HTTP

  • 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