Menu

Notification Service, Part 7: Concurrency and Resilience
📰

Notification Service, Part 7: Concurrency and Resilience

DEV Community: microservices·Surhid Amatya·7 days ago
#413G4lsK
Long article (614 words) — no AI summary yet.
Reading 0:00
15s threshold

A notification service spends most of its time waiting on someone else: Firebase, Brevo, Twilio, DynamoDB, Kafka. Heavy computation isn't the risk. The risk is a slow or failing provider letting work pile up. This post covers what the service uses to stay stable.

Who does the work

There's no separate job queue or worker fleet. The Kafka listeners are the workers: each one consumes an event, stores it and calls the providers. Kafka is the queue, and adding consumer replicas is how you add capacity (Part 3).

The REST API is a different thing. It serves the timeline, preferences and template management, and it doesn't send event notifications.

Virtual threads

The service runs on virtual threads, for web requests and for async tasks. They're cheap, so a call waiting on a slow provider doesn't hold an operating-system thread.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.