SlideShare a Scribd company logo
PRESENTED BY
Stateful Interaction in Serverless
Architecture with Redis
Pyounguk Cho
Oracle, Director of Product Management
PRESENTED BY
1 Problem Space
How to bring stateful behaviors to Serverless Architecture
2 Redis-based Solution
Proposed solutions with Redis and considerations
3 Demo & Summary
“Redis in Serverless” in action
Agenda:
PRESENTED BY
Problem Space
PRESENTED BY
Software Development Drives Business Agility
Development Process Application Architecture Deployment Packaging Application Infrastructure
2000-072008-152016+
Waterfall Monolithic Physical Server Datacenter
N-Tier Virtual Server HostedAgile
Plan
Code
Build
Test
Release
Deploy
Operate
Monitor
DevOps
Microservices Containers Cloud
PRESENTED BY
Serverless Architecture
Only pay for compute
resources actually
consumed.
Truly Cloud-Elastic
Team can rapidly deploy and
upgrade applications
maintaining service availability
DevOps Enabled
Scales automatically to
handle incoming requests
Fully Autonomous
5
PRESENTED BY
Introducing Oracle Functions
Autonomous
Platform auto-scales functions
No servers to provision,
manage
Pay Per Use
Pay for execution, not for idle
time
No Lock-in
Built on open-source Fn
Project and Docker
Oracle Functions
Functions-as-a-Service
Oracle Cloud Integrated
Container Native
Multi-tenant
Secure
Open Source Engine
6
PRESENTED BY
How Does it Work?
Push
container to
registry
Configure
function
trigger
Code runs
only when
triggered
Pay for code
execution time
only
7
PRESENTED BY
Common Use Cases
Web, Mobile, IoT
Backends
Real-time Stream,
File Processing
Batch ProcessingIntegrate and
Extend SaaS
8
PRESENTED BY
Example: Integrate and Extend SaaS
ORACLE CLOUD
ERP Cloud
Analytics
Visualize dataEnrich data and
send to Analytics
service
Use data
for analytics
and insights
Inventory create / update
Service
Cloud
Trigger
functionsSupport incident
create / update
Functions
9
PRESENTED BY
Match made in cloud!
• Cloud-native
– Elastic
• Container-native
– Redis is most-dockerized OSS
• High performant
– In-memory
– Write vs. read-only
• Redis is a great choice for stateless scenarios
– Instant data update & access
– Asynchronous processing via pub-sub
• Scaling Redis matters even more in Serverless
Why Redis in Serverless?
Master Replica
Master Replica
Master Replica
PRESENTED BY
Let it be stateful!
• “Stateful + Serverless” is an oxymoron?
– Serverless ≄ Stateless
– Serverless architecture is more natural for stateless applications
– Similar to TCP over IP
• Multiple function invocations need to be tied together as a “session”
• Use cases
– Stateful skills for digital assistants
• Alexa/Google Assistant
• Chatbot
– Stateful APIs
– Loosely-coupled transactional application (shopping cart)
Why Stateful in Serverless
PRESENTED BY
How to enable statefulness
• Logically similar to server-side HTTP session
– Session ID/token
• Client-driven
• Function-initiated
– Session data
• # of entries
• Max size
– Client-provided data (aka, cookies)
• Slightly different from server-side HTTP session
– Function does not keep session information
– Function needs to externalize session tracking to external components such as database or
Redis
Stateful Serverless Architecture
PRESENTED BY
Solution with Redis
PRESENTED BY
ORACLE CLOUD
Stateful Use Case: Web and Mobile Backends
Identity
Process dataTrigger
functions
Functions
Web, Mobile Apps
API
Platform
Mobile
Data
persisted
Database
1
4
Loyalty
program
PRESENTED BY
How to enable statefulness with Redis
• Data structure
– Simple session data: Hash
– Complex session data: Hash + list/set/hash
– Multiple boolean session data : Hash + bitmap
• Session initiation
– Unique sessionid as the key to hash
• Session expiration/termination
– For session timeout: Redis TTL
– For Termination: Delete session entries
– Eviction policies
• Volatile-ttl: when session timeout is in place
• Noeviction or allkeys-lru: otherwise (more memory efficient)
Redis for Stateful Serverless
PRESENTED BY
Architectural considerations
• Topology
– Request routing
• Primary for read/write function endpoints
• Read-replicas nodes for read-only function endpoints
– Redis cluster
• To handle a large data set
• To segregate session data from application data
• HA & Scalability
– Throttling or lack thereof (Function and/or Redis)
– How to handle a surge in function requests (how to make Redis “cloud-elastic”)
– High number of short, transient duration connections (horizontal scaling matters)
– Persistent client connections for “hot function endpoints”
• Cardinality
– A separate session Hash for each function application comprising multiple endpoints
Redis for Stateful Serverless (Cont.)
PRESENTED BY
Redis configuration tuning
• Should be optimized for highly chatty interactions
– Every function invocation needs to read session data back (no session stickiness)
– # of max connections: high
– For high workload (tcp-backlog): high
– Connection timeout (timeout): low
– Client status (tcp-keepalive): high (for busy function endpoints) or low (otherwise)
• Replication
– Synchronous: For few write operations
– Asynchronous
Redis for Stateful Serverless (Cont.)
PRESENTED BY
Demo
PRESENTED BY
Redis can be complimentary to Serverless architecture
• Can enhance stateless design
• Can enable stateful design
Redis can be added to Serverless architecture naturally for stateful use cases
• Consider serverless-specific architectural implications
• Leverage relevant Redis capabilities
Summary
Thank you!
PRESENTED BY

More Related Content

PDF
Streaming Data Analytics with ksqlDB and Superset | Robert Stolz, Preset
PDF
Nordstrom's Event-Sourced Architecture and Kafka-as-a-Service | Adam Weyant a...
PDF
Patterns of Distributed Application Design
PDF
Death of the dumb pipes: Using Apache Kafka® for Integration projects
PDF
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
PDF
Mainframe Integration, Offloading and Replacement with Apache Kafka | Kai Wae...
PDF
Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...
PDF
Hybrid Kafka, Taking Real-time Analytics to the Business (Cody Irwin, Google ...
Streaming Data Analytics with ksqlDB and Superset | Robert Stolz, Preset
Nordstrom's Event-Sourced Architecture and Kafka-as-a-Service | Adam Weyant a...
Patterns of Distributed Application Design
Death of the dumb pipes: Using Apache Kafka® for Integration projects
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
Mainframe Integration, Offloading and Replacement with Apache Kafka | Kai Wae...
Building Information Systems using Event Modeling (Bobby Calderwood, Evident ...
Hybrid Kafka, Taking Real-time Analytics to the Business (Cody Irwin, Google ...

What's hot (20)

PDF
Self-service Events & Decentralised Governance with AsyncAPI: A Real World Ex...
PDF
David Max SATURN 2018 - Migrating from Oracle to Espresso
PPTX
PCAP Graphs for Cybersecurity and System Tuning
PDF
The Event Mesh: real-time, event-driven, responsive APIs and beyond
PDF
Building a Modern, Scalable Cyber Intelligence Platform with Apache Kafka | J...
PPTX
Accelerate Business Agility with PaaS
PPTX
Confluent and Syncsort Webinar August 2016
PPTX
Redis Day Bangalore 2020 - Session state caching with redis
PPTX
Building a Modern, Scalable Cyber Intelligence Platform with Apache Kafka | J...
PDF
Building Data Quality Audit Framework using Delta Lake at Cerner
PPTX
Cloud design principles
PDF
Building a Streaming Pipeline on Kubernetes Using Kafka Connect, KSQLDB & Apa...
PDF
How a distributed graph analytics platform uses Apache Kafka for data ingesti...
PDF
Why Kafka Works the Way It Does (And Not Some Other Way) | Tim Berglund, Conf...
PDF
Building a Real-Time Forecasting Engine with Scala and Akka
PDF
APAC Kafka Summit - Best Of
PPTX
Cloud-Based Event Stream Processing Architectures and Patterns with Apache Ka...
PDF
Kafka Summit SF 2017 - Worldwide Scalable and Resilient Messaging Services wi...
PDF
PPTX
FinOps introduction
Self-service Events & Decentralised Governance with AsyncAPI: A Real World Ex...
David Max SATURN 2018 - Migrating from Oracle to Espresso
PCAP Graphs for Cybersecurity and System Tuning
The Event Mesh: real-time, event-driven, responsive APIs and beyond
Building a Modern, Scalable Cyber Intelligence Platform with Apache Kafka | J...
Accelerate Business Agility with PaaS
Confluent and Syncsort Webinar August 2016
Redis Day Bangalore 2020 - Session state caching with redis
Building a Modern, Scalable Cyber Intelligence Platform with Apache Kafka | J...
Building Data Quality Audit Framework using Delta Lake at Cerner
Cloud design principles
Building a Streaming Pipeline on Kubernetes Using Kafka Connect, KSQLDB & Apa...
How a distributed graph analytics platform uses Apache Kafka for data ingesti...
Why Kafka Works the Way It Does (And Not Some Other Way) | Tim Berglund, Conf...
Building a Real-Time Forecasting Engine with Scala and Akka
APAC Kafka Summit - Best Of
Cloud-Based Event Stream Processing Architectures and Patterns with Apache Ka...
Kafka Summit SF 2017 - Worldwide Scalable and Resilient Messaging Services wi...
FinOps introduction
Ad

Similar to Stateful Interaction In Serverless Architecture With Redis: Pyounguk Cho (20)

PDF
The future of serverless is STATE!
PDF
Serverless brewbox
PDF
Introduction to Serverless through Architectural Patterns
PDF
Stateful on Stateless - The Future of Applications in the Cloud
PDF
Designing Practical RESTful APIs
PDF
Aw (3) webinar serverless-fisher-rymer
PDF
Cloudstate - Towards Stateful Serverless
PDF
Square Peg Round Hole: Serverless Solutions For Non-Serverless Problems
PDF
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
PPTX
Serverless Architecture in application development - 7 modern trends every IT...
PDF
Cloudstate—Towards Stateful Serverless
PDF
How to handle errors and retries in a stateless environment - Nitzan Shapira ...
PPTX
Serverless Pune meetup 3
PDF
Serverless Toronto User Group - Let's go Serverless!
PDF
Serverless book
PDF
Free the Functions with Fn project!
PDF
Serverless Node.js
PPTX
From Serverless to InterCloud
PPTX
The FN Project by Maximilian Jerg
PDF
Building resilient serverless systems with non-serverless components - Cardif...
The future of serverless is STATE!
Serverless brewbox
Introduction to Serverless through Architectural Patterns
Stateful on Stateless - The Future of Applications in the Cloud
Designing Practical RESTful APIs
Aw (3) webinar serverless-fisher-rymer
Cloudstate - Towards Stateful Serverless
Square Peg Round Hole: Serverless Solutions For Non-Serverless Problems
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
Serverless Architecture in application development - 7 modern trends every IT...
Cloudstate—Towards Stateful Serverless
How to handle errors and retries in a stateless environment - Nitzan Shapira ...
Serverless Pune meetup 3
Serverless Toronto User Group - Let's go Serverless!
Serverless book
Free the Functions with Fn project!
Serverless Node.js
From Serverless to InterCloud
The FN Project by Maximilian Jerg
Building resilient serverless systems with non-serverless components - Cardif...
Ad

More from Redis Labs (20)

PPTX
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
PPTX
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
PPTX
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
PPTX
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
PPTX
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
PPTX
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
PPTX
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
PPTX
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
PPTX
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
PPTX
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
PPTX
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
PPTX
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
PPTX
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
PPTX
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
PPTX
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
PPTX
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
PPTX
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
PDF
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
PPTX
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
PPTX
Redis as a High Scale Swiss Army Knife by Rahul Dagar and Abhishek Gupta of G...
Protecting Your API with Redis by Jane Paek - Redis Day Seattle 2020
The Happy Marriage of Redis and Protobuf by Scott Haines of Twilio - Redis Da...
SQL, Redis and Kubernetes by Paul Stanton of Windocks - Redis Day Seattle 2020
Rust and Redis - Solving Problems for Kubernetes by Ravi Jagannathan of VMwar...
Redis for Data Science and Engineering by Dmitry Polyakovsky of Oracle
Practical Use Cases for ACLs in Redis 6 by Jamie Scott - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Leveraging Redis for System Monitoring by Adam McCormick of SBG - Redis Day S...
JSON in Redis - When to use RedisJSON by Jay Won of Coupang - Redis Day Seatt...
Highly Available Persistent Session Management Service by Mohamed Elmergawi o...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Building a Multi-dimensional Analytics Engine with RedisGraph by Matthew Goos...
RediSearch 1.6 by Pieter Cailliau - Redis Day Bangalore 2020
RedisGraph 2.0 by Pieter Cailliau - Redis Day Bangalore 2020
RedisTimeSeries 1.2 by Pieter Cailliau - Redis Day Bangalore 2020
RedisAI 0.9 by Sherin Thomas of Tensorwerk - Redis Day Bangalore 2020
Rate-Limiting 30 Million requests by Vijay Lakshminarayanan and Girish Koundi...
Three Pillars of Observability by Rajalakshmi Raji Srinivasan of Site24x7 Zoh...
Solving Complex Scaling Problems by Prashant Kumar and Abhishek Jain of Myntr...
Redis as a High Scale Swiss Army Knife by Rahul Dagar and Abhishek Gupta of G...

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Network Security Unit 5.pdf for BCA BBA.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Encapsulation theory and applications.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
Teaching material agriculture food technology
PDF
Modernizing your data center with Dell and AMD
Understanding_Digital_Forensics_Presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
NewMind AI Monthly Chronicles - July 2025
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Network Security Unit 5.pdf for BCA BBA.
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Diabetes mellitus diagnosis method based random forest with bat algorithm
Encapsulation theory and applications.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Teaching material agriculture food technology
Modernizing your data center with Dell and AMD

Stateful Interaction In Serverless Architecture With Redis: Pyounguk Cho

  • 1. PRESENTED BY Stateful Interaction in Serverless Architecture with Redis Pyounguk Cho Oracle, Director of Product Management
  • 2. PRESENTED BY 1 Problem Space How to bring stateful behaviors to Serverless Architecture 2 Redis-based Solution Proposed solutions with Redis and considerations 3 Demo & Summary “Redis in Serverless” in action Agenda:
  • 4. PRESENTED BY Software Development Drives Business Agility Development Process Application Architecture Deployment Packaging Application Infrastructure 2000-072008-152016+ Waterfall Monolithic Physical Server Datacenter N-Tier Virtual Server HostedAgile Plan Code Build Test Release Deploy Operate Monitor DevOps Microservices Containers Cloud
  • 5. PRESENTED BY Serverless Architecture Only pay for compute resources actually consumed. Truly Cloud-Elastic Team can rapidly deploy and upgrade applications maintaining service availability DevOps Enabled Scales automatically to handle incoming requests Fully Autonomous 5
  • 6. PRESENTED BY Introducing Oracle Functions Autonomous Platform auto-scales functions No servers to provision, manage Pay Per Use Pay for execution, not for idle time No Lock-in Built on open-source Fn Project and Docker Oracle Functions Functions-as-a-Service Oracle Cloud Integrated Container Native Multi-tenant Secure Open Source Engine 6
  • 7. PRESENTED BY How Does it Work? Push container to registry Configure function trigger Code runs only when triggered Pay for code execution time only 7
  • 8. PRESENTED BY Common Use Cases Web, Mobile, IoT Backends Real-time Stream, File Processing Batch ProcessingIntegrate and Extend SaaS 8
  • 9. PRESENTED BY Example: Integrate and Extend SaaS ORACLE CLOUD ERP Cloud Analytics Visualize dataEnrich data and send to Analytics service Use data for analytics and insights Inventory create / update Service Cloud Trigger functionsSupport incident create / update Functions 9
  • 10. PRESENTED BY Match made in cloud! • Cloud-native – Elastic • Container-native – Redis is most-dockerized OSS • High performant – In-memory – Write vs. read-only • Redis is a great choice for stateless scenarios – Instant data update & access – Asynchronous processing via pub-sub • Scaling Redis matters even more in Serverless Why Redis in Serverless? Master Replica Master Replica Master Replica
  • 11. PRESENTED BY Let it be stateful! • “Stateful + Serverless” is an oxymoron? – Serverless ≄ Stateless – Serverless architecture is more natural for stateless applications – Similar to TCP over IP • Multiple function invocations need to be tied together as a “session” • Use cases – Stateful skills for digital assistants • Alexa/Google Assistant • Chatbot – Stateful APIs – Loosely-coupled transactional application (shopping cart) Why Stateful in Serverless
  • 12. PRESENTED BY How to enable statefulness • Logically similar to server-side HTTP session – Session ID/token • Client-driven • Function-initiated – Session data • # of entries • Max size – Client-provided data (aka, cookies) • Slightly different from server-side HTTP session – Function does not keep session information – Function needs to externalize session tracking to external components such as database or Redis Stateful Serverless Architecture
  • 14. PRESENTED BY ORACLE CLOUD Stateful Use Case: Web and Mobile Backends Identity Process dataTrigger functions Functions Web, Mobile Apps API Platform Mobile Data persisted Database 1 4 Loyalty program
  • 15. PRESENTED BY How to enable statefulness with Redis • Data structure – Simple session data: Hash – Complex session data: Hash + list/set/hash – Multiple boolean session data : Hash + bitmap • Session initiation – Unique sessionid as the key to hash • Session expiration/termination – For session timeout: Redis TTL – For Termination: Delete session entries – Eviction policies • Volatile-ttl: when session timeout is in place • Noeviction or allkeys-lru: otherwise (more memory efficient) Redis for Stateful Serverless
  • 16. PRESENTED BY Architectural considerations • Topology – Request routing • Primary for read/write function endpoints • Read-replicas nodes for read-only function endpoints – Redis cluster • To handle a large data set • To segregate session data from application data • HA & Scalability – Throttling or lack thereof (Function and/or Redis) – How to handle a surge in function requests (how to make Redis “cloud-elastic”) – High number of short, transient duration connections (horizontal scaling matters) – Persistent client connections for “hot function endpoints” • Cardinality – A separate session Hash for each function application comprising multiple endpoints Redis for Stateful Serverless (Cont.)
  • 17. PRESENTED BY Redis configuration tuning • Should be optimized for highly chatty interactions – Every function invocation needs to read session data back (no session stickiness) – # of max connections: high – For high workload (tcp-backlog): high – Connection timeout (timeout): low – Client status (tcp-keepalive): high (for busy function endpoints) or low (otherwise) • Replication – Synchronous: For few write operations – Asynchronous Redis for Stateful Serverless (Cont.)
  • 19. PRESENTED BY Redis can be complimentary to Serverless architecture • Can enhance stateless design • Can enable stateful design Redis can be added to Serverless architecture naturally for stateful use cases • Consider serverless-specific architectural implications • Leverage relevant Redis capabilities Summary