@rav:
I don't know the context of your application so I might be entirely wrong here and I apologize in advance.
My producer, hopes to hundreds of thousands concurrent users so I must use clustering too.
You shouldn't take decisions on clustering based on "hopes" but instead you should use realistic estimates.
We have got in the habit of asking "why clustering", because we get many requests from clients, small and big, who are starting to build an MMO or multiplayer game, and their first concern is to be able to handle zillions of concurrent users.
This is perfectly understandable but if you have experience in this field you know that the user base typically builds up over some time (usually months) and it's unlikely that will really need to start with a cluster. You won't need it for quite some time, actually.
Of course there are exceptions to this. If your company name is Disney, MTV, Warner Bros etc... or any another big guy who can do massive ad campaigns then of course you'll need to be prepared for the user flood.
Again this is why we ask
and in general we tend to discourage clustering , especially if it's the first application of this type being developed. Why? For a series of good reasons:
1- A single dedicated server can handle tens of thousands of clients depending on the hardware, complexity of server code etc...
Let's say the hardware limit is 50K CCU. This roughly means 10 million unique visits a day... which is the kind of web traffic that a first class news website does.
Bottom line: not everyone is in the range of the NY Times right? So we want make sure that the customer's traffic expectations are based on sound estimates, not just anxiety or excess of self confidence.
2- Clustering adds an extra layer of complexity which probably, in 50% of the cases, can be avoided or at least postponed.
It is great to think ahead of problems, but it is also wise to take care of problems when they are a real concern instead of slowing down the development with extra work.
Bottom line: while designing your application think of good strategies to scale your application. Then spend some time in studying a realistic traffic estimate and see if clustering is really needed from start.
3- The Terracotta fever.
Terracotta is cool and everyone wants to use it. It can do great stuff with a Java application in terms of scalability. It is also the most complex of the options and it requires excellent understanding of the Java platform, scalability issues and server architectures.
If you are new to this field you should take one step at a time unless your team is made of up real gurus.
Also Terracotta is not the only way for clustering SmartFoxServer. In fact we have a number of very big clients that run stellar traffic with large clusters and don't even use it.
Bottom line: carefully evaluate the scalabilty strategy taking into account its complexity and the overall impact on managing the infrastructure.