19 Comments
Sep 18Liked by Ashish Pratap Singh

This was quite amazing and super super helpful. I am an experienced coder but have not had many opportunities to design high scale systems at work or in practice so this is going to help me a ton.

Expand full comment
author

Really happy to hear this, thank you so much!

Expand full comment
Sep 30Liked by Ashish Pratap Singh

Nice one Ashish 👍🏻

Expand full comment
Sep 25Liked by Ashish Pratap Singh

Excellent study case, Ashish!

Expand full comment
Sep 20Liked by Ashish Pratap Singh

Impressive! You are truly a gem. Thank you for dedicating your time and sharing such valuable content with crystal-clear clarity.

Expand full comment
author

Thank you 😊

Love to hear this.

Expand full comment
Sep 18Liked by Ashish Pratap Singh

Great content brother

Expand full comment
author

thank you!

Expand full comment
Sep 18Liked by Ashish Pratap Singh

Thanks for sharing.

Expand full comment
author

you are welcome!

Expand full comment

Ashish,

This is awesome content. Just few points to add on if you agree:

1) Syncing mechanisms between Cache and User Preferences NoSQL db to ensure consistency

2) How does Cache payload look like along with the key

3) Cache TTL, eviction strategy, invalidation strategy, cache writing strategy, dealing with a data level conflict (discrepancy between current cache and NoSQL db entry)

4) Deduplication of notification so that users don’t get same notification again

Expand full comment

That's what I think, if a failure occurs will we loose all the data/events that was supposed to be pick by the Notification Service ? Can anyone help here ?

Expand full comment

I learnt a lot. One query here is it channel processor fails to deliver the notification due to some reason , will it take responsibility of retrying again or it can just update in the scheduler database with scheduled time as the next time using exponential backoff strategy so scheduler picks it up for the next retry. What would be the expected approach should be ?

Thanks.

Expand full comment

thank you so much for this amazing explanation. can this notification system design meet my situation where I have 30k IoT devices, and users can create custom conditions? For example, user1 has device1 and device2 and may create condition1 (for example, notify me if the temperature > 89) for device1 and condition2 (temperature > 60) for device2.

Expand full comment

Let’s talk about implementing the notification service , with best design / architecture / patterns .

I would like to do it in rust .

Anyone interested to tag along ?

I am thinking to open source such components so lot others can benefit

Expand full comment

Great post Ashish, well articulated main components and flow.

I noticed that message content generation is done by Notification Service. Would it make more resilient and robust to put behind inbound queue as to manage the spike in load on Notification service? Each request to Notification service to generate message will also take up connection from the web server to handle the request until generated message is placed in the queue. What if error occurs during generation of message content, will the request be dropped?

Expand full comment

That's what I think, if a failure occurs will we loose all the data/events that was supposed to be pick by the Notification Service ? Can anyone help here ?

Expand full comment

Great insights. This article helps how to think widely considering every aspect while designing a scalable and reliable system. Can you provide some example for scheduler service readily available to use? Also, you can provide a deeper explanation of how a scheduler service should be designed.

Expand full comment

How will you partition the Kafka topics to support such a large workload? Also, we are sending large email attachments on the Kafka queue, won't this affect the performance, anything we can do to mitigate it?

Expand full comment