[erlang-questions] High payload messages between nodes

Roberto Ostinelli <>
Tue Oct 23 09:24:59 CEST 2012

Hi Max,

this sounds very interesting. Do you then open a gen_tcp socket for every
payload message you send out? connection pool, but if so, how do you then
route it appropriately?

On Monday, October 22, 2012, Max Lapshin wrote:

> It was just duscussed in russian mailing list: send control messages over
> native erlang and payload via socket
> On Tuesday, October 23, 2012, Roberto Ostinelli wrote:
>> Dear list,
>> I'm building a 2-tier architecture where:
>>    - the 1st tier is dedicated to keeping open socket connections to the
>>    outside clients, and then sends anything it receives from TCP to the 2nd
>>    tier
>>    - the 2nd tier receives all TCP data from the 1st tier and does the
>>    real job
>> The reason why I'm doing this is because in case of crashes in the main
>> application (2nd tier), then the outside connections will still be alive,
>> hence avoiding the horrible peak of clients trying to reconnect all at once.
>> My main issue is that, afaik, sending big messages between nodes is
>> actually a performance killer. If we set up this 2-tier architecture, then
>> every stanza that gets received from the 1st tier will have to be resent
>> internally to another node.
>> So, while the 1st tier gets this from individual sockets, the message
>> passing between nodes gets done on a single TCP connection between nodes.
>> I'm just afraid this is actually bad design and can lead to problems.
>> Therefore: are there alternatives to this? A custom Erlang transport? A
>> pool of sockets?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121023/e7123c70/attachment.html>

More information about the erlang-questions mailing list