Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot establish multiple connections to the same server at a time #5

Open
kmaehashi opened this issue Jan 21, 2014 · 2 comments
Open
Assignees
Labels

Comments

@kmaehashi
Copy link
Member

Derived from discussion in jubatus/jubatus#507 and https://gist.github.com/kmaehashi/8516915

When using session pool feature of msgpack-rpc, only one connection per server is allowed at a time.

@y-oda-oni-juba
Copy link
Contributor

I think we have two approaches for this issue:

  1. use 'multimap' instead of 'map' to implement session pool
    ( session pool have more-than-one sessions per server )

    pros:

    • maybe simple
    • performance: any clients can communicate same server completely simultaneously

    cons:

    • resources: in high-load situation, many sockets will be created
  2. support 'pipeline' properly in msgpack-rpc
    ( one client can send a request to a server while other clients wait response from
    same server and same connection )

    pros:

    • resource saving

    cons:

    • hard-way?

    • performance: msgpack-rpc protocol doesn't support 'chunked' message.
      while a client is sending/receiving a huge message, other clients
      must wait it.

      ( But, in most cases, servers and proxies are running in same local network.
      we can ignore this issue? Or, multiple proxies on one client PC avoid this issue? )

@kmaehashi
Copy link
Member Author

Thanks for the follow-up @y-oda-oni-juba! I think the first idea is better, because:

  • For the only drawback of the first idea, "in high-load situation, many sockets will be created", users can workaround this by adjusting socket pool size.
  • The second idea is a huge architecture change, which is almost rewriting the original msgpack-rpc code.

Could you start trying with the first idea, @gintenlabo?

@kmaehashi kmaehashi assigned kmaehashi and unassigned gintenlabo Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants