开发者

Horizontal scalability for distributed apps, how to achieve that?

开发者 https://www.devze.com 2023-03-11 03:15 出处:网络
I would like to disregard web applications here, because to scale them horizontal开发者_Python百科ly, ie to use multiple server instances together, it is \"sufficient\" to just duplicate the server so

I would like to disregard web applications here, because to scale them horizontal开发者_Python百科ly, ie to use multiple server instances together, it is "sufficient" to just duplicate the server software over the machines and just use a sort of router that forwards requests to the "less busy" server machine.

But what if my server application allows users to engage together in realtime ?

If the response to the request of a certain client X depends on the context of a client Y whose connection is managed by another machine then "inter machines" communication is needed.

I'd like to know the kind of "design solutions" that people has used in such cases.

For example, the people at Facebook must have already encountered such situation when enabling the chat feature of their social app.

Thank you in advance for any advise.


One solution to achive that is to use distibuted caches like memcache (Facebook also uses that aproach). Then all the information which is needed on all nodes is stored in that cache (and a database if it needs to be permanent) an so all nodes can access that information (with a very small latency between the nodes).

regards


You should consider some solutions that provide transparent horizontal database scalability and guarantee ACID semantics. There are many solutions that offer this at various levels. People at Facebook which you reference have solved the problem by accepting eventual consistency but your question leads me to believe that you can't accept eventual consistency.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号