Member-only story
Deploying a real time notification system on Kubernetes : Part 1
Now-a-days real time notification feature is quite popular among various kind of web applications. This article will go through the process of building a real time notification system, deploying it on Kubernetes and scale it for thousands of users. I assume that you already know about Node.JS, Docker and Kubernetes, because I will use these tools for this post and there will be no in depth explanations. And also please note that I will just show the basic implementation which is not production ready ( security, code quality, testing) but can serve thousands of users. :)
All the related code implementations and configurations are available on this repository: https://github.com/faiyaz26/rtn-k8s
Please check the release tab (https://github.com/faiyaz26/rtn-k8s/releases) to find out implementations in different stages.
Before start
To build the real time notification system I will use a library named “Socket.io”. This library implements both ajax based long polling and websocket for real time communication. You can check this article by Socket.io to understand about it. But this library is so simple to use that you can even understand what is happening by going through my article.
For local development, I am using Docker-Compose, a tool to run multiple containers. But for production I will use Kubernetes. As both these tools requires Docker so I will create Dockerfile as well for containerizing.