1NN_PAIR(7)                       nanomsg 1.1.5                      NN_PAIR(7)
2
3
4

NAME

6       nn_pair - one-to-one scalability protocol
7

SYNOPSIS

9       #include <nanomsg/nn.h>
10
11       #include <nanomsg/pair.h>
12

DESCRIPTION

14       Pair protocol is the simplest and least scalable scalability protocol.
15       It allows scaling by breaking the application in exactly two pieces.
16       For example, if a monolithic application handles both accounting and
17       agenda of HR department, it can be split into two applications
18       (accounting vs. HR) that are run on two separate servers. These
19       applications can then communicate via PAIR sockets.
20
21       The downside of this protocol is that its scaling properties are very
22       limited. Splitting the application into two pieces allows to scale the
23       two servers. To add the third server to the cluster, the application
24       has to be split once more, say by separating HR functionality into
25       hiring module and salary computation module. Whenever possible, try to
26       use one of the more scalable protocols instead.
27
28   Socket Types
29       NN_PAIR
30           Socket for communication with exactly one peer. Each party can send
31           messages at any time. If the peer is not available or send buffer
32           is full subsequent calls to nn_send(3) will block until it’s
33           possible to send the message.
34
35   Socket Options
36       No protocol-specific socket options are defined at the moment.
37

SEE ALSO

39       nn_bus(7) nn_pubsub(7) nn_reqrep(7) nn_pipeline(7) nn_survey(7)
40       nanomsg(7)
41

AUTHORS

43       Martin Sustrik <sustrik@250bpm.com>
44
45
46
47                                  2023-07-20                        NN_PAIR(7)
Impressum