menger.blogg.se

Messaging app
Messaging app




To handle that number and provide reliability and better availability you have to split traffic to multiple servers. WhatsApp handles ~20B inbounding and ~40B outbounding messages per day. These could be one-to-one direct messages, one-to-many group messages, broadcasting presence changes to subscribers and/or some kind of notifications like chat states or message statuses. The main responsibility of the chat app backend is sending messages, presences and notifications between senders and receivers in real time. Principle 2: Ensure efficient message fanout Implement some kind of message stream management to negotiate which incoming and outgoing messages didn’t reach the client and/or server due to connection problems (e.g.Implement connection failure discovery in your client and server application (e.g.Provide a gateway cluster (separately from application machines) which will be responsible for connection handling.With this DNS, you could easily reroute queries from a specific region to a load balancer located in a specific city. Amazon Route 53 can be helpful at this - the DNS service provides geolocation routing that allows developers to allocate resources that serve the traffic based on users’ geographic location. Use the geolocation of your users to connect them to the nearest datacenter to minimize latencies.When sudden network fluctuations happen, TCP connection can fall into a half-open state when one of the connection ends doesn't know that the other end is unavailable. Temporary disconnections happen especially for mobile devices where network problems are really common.

messaging app

That isn’t easy to achieve at that scale because of system limitations, network latency and inhomogeneous network between servers and clients. Messaging apps like WhatsApp, Slack or Discord handle hundreds of thousand to millions connections per node. When you are planning to build a large-scale chat app, the first thing you should take into account is providing a reliable connection to the end users.

messaging app

Principle 1: Ensure a reliable connection

messaging app

Here are four key principles you should follow to ensure you engineer a real-time chat application backend that is scalable and doesn’t crash. Providing a dependable chat functionality that is highly reliable and delights end-users is a complex challenge. Chat applications typically serve high and fluctuating numbers of concurrent users – between thousands and millions, and some of them will use your app more heavily than others.






Messaging app