0

My team is developing a java-socket programming with push notifications based realtime chat application for android and ios.

We have worked a lot on the code and built it.But there are a few questions that are worthy to be answered before scaling the application.

1)Is java based socket programming scalable for a billion users?Is it the best way to make a chat application.

2)How many poeple can a chat room handle?Is it possible to add about 500-1000 participants?

3)Does this all depend on the physical server(performance) and what will be the expense?

Please help if you know anyone of the answers and thankyou in advance.

1 Answer 1

1

A socket is only a system to move data between a client to a server.

There are some limitations on the number of socket that a single S.O. can handle, but it is possible to scale between different nodes. Java can do that without problems.

If you choose the right architecture and scale it horizontally there is potentially no problem handling also millions of concurrent users and thousand of users on the same room.

The biggest bottleneck is on the network speed because handling millions of messages can block your network. So phisically the problem generally isn't the cpu but the network throughput.

To have an idea on how much simultaneous connections a server can handle read this article:

In 2011 WhatsApp achieved 1 million established tcp sessions on a single machine with memory and cpu to spare. In 2012 that was pushed to over 2 million tcp connections. In 2013 WhatsApp tweeted out: On Dec 31st we had a new record day: 7B msgs inbound, 11B msgs outbound = 18 billion total messages processed in one day! Happy 2013!!!

Sign up to request clarification or add additional context in comments.

15 Comments

Thankyou for the answer,but the network throughput can be managed/scaled with large servers?And what is the estimate of the no/size of servers i need and what will be the overall cost if you can guess......it will be very helpful for me..
No you can only move less data as possible or distribute it between different nodes. For example to reduce the network traffic of chat server, advanced chat systems like Whatsapp use different servers to handle image sharing and chat. So intensive network traffic doesn't slow down your chat.
And what is the estimate of the no/size of servers i need and what will be the overall cost if you can guess......it will be very helpful for me..
It is not possible to say without knowing something about your architecture. But I edit the answer to give you some numbers.
If you think this answer is the right one and helps you, you can upvote it and flag it as the right answer with the green check
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.