Kerstin Puschke
@titanoboa42
High availability by offloading work -
background jobs, message queues, or Kafka
Slide 2
Slide 2 text
@titanoboa42
Slide 3
Slide 3 text
@titanoboa42
Different approaches to offload work to
ensure high availability
Slide 4
Slide 4 text
@titanoboa42
• High availability & offloading work
Outline
Slide 5
Slide 5 text
@titanoboa42
• High availability & offloading work
• Background jobs
Outline
Slide 6
Slide 6 text
@titanoboa42
• High availability & offloading work
• Background jobs
• Message oriented middleware
Outline
Slide 7
Slide 7 text
@titanoboa42
• Event log
Outline
Slide 8
Slide 8 text
@titanoboa42
• Event log
• Summary
Outline
Slide 9
Slide 9 text
@titanoboa42
High availability & offloading work
Slide 10
Slide 10 text
@titanoboa42
High Availability
Slide 11
Slide 11 text
@titanoboa42
users
can interact
with the system
High Availability
Slide 12
Slide 12 text
@titanoboa42
users
can interact meaningfully
with the system
High Availability
Slide 13
Slide 13 text
@titanoboa42
community of
users
can interact meaningfully
with the system
High Availability
Slide 14
Slide 14 text
@titanoboa42
community of
users
can interact meaningfully
with the system whenever needed
High Availability
Slide 15
Slide 15 text
@titanoboa42
community of
users
can interact meaningfully
with the system whenever needed
High Availability
community of
users
can interact meaningfully
with the system whenever needed
@titanoboa42
Task
Queue
Response times
App
Server
Worker
Slide 28
Slide 28 text
@titanoboa42
Task
Queue
Spikeability
App
Server
Worker
Slide 29
Slide 29 text
@titanoboa42
Task
Queue
Parallelization
App
Server
Worker Worker
Worker
Slide 30
Slide 30 text
@titanoboa42
Task
Queue
Retries
App
Server
Worker Worker
Worker
Slide 31
Slide 31 text
@titanoboa42
Mastering challenges
Slide 32
Slide 32 text
@titanoboa42
Job queued and processed by different versions
Slide 33
Slide 33 text
@titanoboa42
• No breaking changes to job parameters
Job queued and processed by different versions
Slide 34
Slide 34 text
@titanoboa42
• No breaking changes to job parameters
• Changes need to be backwards compatible
until legacy jobs have been processed
Job queued and processed by different versions
Slide 35
Slide 35 text
@titanoboa42
No exactly once delivery
Slide 36
Slide 36 text
@titanoboa42
• “At least” vs. “at most” once delivery
No exactly once delivery
Slide 37
Slide 37 text
@titanoboa42
• “At least” vs. “at most” once delivery
• Idempotent jobs & at least once delivery
No exactly once delivery
Slide 38
Slide 38 text
@titanoboa42
Non-transactional queuing
Slide 39
Slide 39 text
@titanoboa42
• Don’t queue from within a db transaction
Non-transactional queuing
Slide 40
Slide 40 text
@titanoboa42
• Don’t queue from within a db transaction
• Job runs before commit, or in case of rollback
Non-transactional queuing
Slide 41
Slide 41 text
@titanoboa42
• Don’t queue from within a db transaction
• Job runs before commit, or in case of rollback
• Commit first: Job not guaranteed to be queued
Non-transactional queuing
@titanoboa42
Propagating updates
Business
Partners
Support
Contracts
Orders
Slide 82
Slide 82 text
@titanoboa42
Propagating updates
Business
Partners
Support
Contracts
Orders
Slide 83
Slide 83 text
@titanoboa42
Messaging
Middleware
Resiliency
Business
Partners
Orders
Slide 84
Slide 84 text
@titanoboa42
Messaging
Middleware
Resiliency
Business
Partners
Slide 85
Slide 85 text
@titanoboa42
Messaging
Middleware
Resiliency
Business
Partners
Orders
Slide 86
Slide 86 text
@titanoboa42
Topic with queues
provides
advanced routing
App
Server
Business
Partners
Support
Contracts
Orders
Messaging
Middleware
Slide 87
Slide 87 text
@titanoboa42
Topic with queues
provides
advanced routing
App
Server
Message
Queue
Business
Partners
Support
Contracts
Orders
Message
Queue
Messaging
Middleware
Slide 88
Slide 88 text
@titanoboa42
Messaging
Middleware
Anonymity for
producer and
consumer
Business
Partners
Support
Contracts
Orders
Slide 89
Slide 89 text
@titanoboa42
Messaging
Middleware
Anonymity for
producer and
consumer
Business
Partners
Invoices
Support
Contracts
Orders
Slide 90
Slide 90 text
@titanoboa42
Messaging
Middleware
Anonymity for
producer and
consumer
FraudScore
Orders
Support
Contracts
Slide 91
Slide 91 text
@titanoboa42
Messaging
Middleware
Anonymity for
producer and
consumer
Invoices
FraudScore
Orders
Support
Contracts