Skip to content

Instantly share code, notes, and snippets.

@andrewvc
Created September 17, 2010 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewvc/584370 to your computer and use it in GitHub Desktop.
Save andrewvc/584370 to your computer and use it in GitHub Desktop.
+-[HTTP SERVER]--+ +----------------------+
| Incoming | | Misc ZMQ Service |
+-----[XREQ]-----+ +-------[XREQ]---------+
\ /
\ /
+-----[XREP]-----+
| RPROXY |
+-----[XREQ]-----+
/ \
/ \
+-----[XREP]-----+ +-----[XREP]-----+
| RPROXY HTTP[1] | | RPROXY HTTP[n] |
+-[HTTP CLIENT]--+ +-[HTTP CLIENT]--+
| |
| |
+--[HTTP Server]-+ +--[HTTP Server]-+
| HTTP Backend | | HTTP Backend |
+----------------+ +----------------+
@imatix
Copy link

imatix commented Sep 17, 2010

  +-[HTTP SERVER]--+    +----------------------+
  |     Incoming   |    |    Misc ZMQ Service  |
  +-----[XREQ]-----+    +-------[XREQ]---------+
                \      /
                 \    /
           +-----[XREP]-----+
           |      RPROXY    |
           +-----[XREP]-----+
            /              \ 
           /                \  
 +-----[XREQ]-----+  +-----[XREQ]-----+
 | RPROXY HTTP[1] |  | RPROXY HTTP[n] |
 +-[HTTP CLIENT]--+  +-[HTTP CLIENT]--+
         |                   |
         |                   |
 +--[HTTP Server]-+ +--[HTTP Server]-+
 |   HTTP Backend | |  HTTP Backend  |
 +----------------+ +----------------+

@imatix
Copy link

imatix commented Sep 17, 2010

  • Routers (XREP) can address N nodes.

  • Dealers (XREQ) can do async requests to N papa (REP) workers and/or async replies to 1 router node.

    +-[HTTP SERVER]--+ +----------------------+
    | Incoming | | Misc ZMQ Service |
    +----[dealer]----+ +------[dealer]--------+
    \ /
    \ /
    +-----[router]-----+
    | RPROXY |
    +-----[router]-----+
    / \
    / \
    +----[dealer]----+ +----[dealer]----+
    | RPROXY HTTP[1] | | RPROXY HTTP[n] |
    +-[HTTP CLIENT]--+ +-[HTTP CLIENT]--+
    | |
    | |
    +--[HTTP Server]-+ +--[HTTP Server]-+
    | HTTP Backend | | HTTP Backend |
    +----------------+ +----------------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment