tipc.rst 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. .. SPDX-License-Identifier: GPL-2.0
  2. =================
  3. Linux Kernel TIPC
  4. =================
  5. Introduction
  6. ============
  7. TIPC (Transparent Inter Process Communication) is a protocol that is specially
  8. designed for intra-cluster communication. It can be configured to transmit
  9. messages either on UDP or directly across Ethernet. Message delivery is
  10. sequence guaranteed, loss free and flow controlled. Latency times are shorter
  11. than with any other known protocol, while maximal throughput is comparable to
  12. that of TCP.
  13. TIPC Features
  14. -------------
  15. - Cluster wide IPC service
  16. Have you ever wished you had the convenience of Unix Domain Sockets even when
  17. transmitting data between cluster nodes? Where you yourself determine the
  18. addresses you want to bind to and use? Where you don't have to perform DNS
  19. lookups and worry about IP addresses? Where you don't have to start timers
  20. to monitor the continuous existence of peer sockets? And yet without the
  21. downsides of that socket type, such as the risk of lingering inodes?
  22. Welcome to the Transparent Inter Process Communication service, TIPC in short,
  23. which gives you all of this, and a lot more.
  24. - Service Addressing
  25. A fundamental concept in TIPC is that of Service Addressing which makes it
  26. possible for a programmer to chose his own address, bind it to a server
  27. socket and let client programs use only that address for sending messages.
  28. - Service Tracking
  29. A client wanting to wait for the availability of a server, uses the Service
  30. Tracking mechanism to subscribe for binding and unbinding/close events for
  31. sockets with the associated service address.
  32. The service tracking mechanism can also be used for Cluster Topology Tracking,
  33. i.e., subscribing for availability/non-availability of cluster nodes.
  34. Likewise, the service tracking mechanism can be used for Cluster Connectivity
  35. Tracking, i.e., subscribing for up/down events for individual links between
  36. cluster nodes.
  37. - Transmission Modes
  38. Using a service address, a client can send datagram messages to a server socket.
  39. Using the same address type, it can establish a connection towards an accepting
  40. server socket.
  41. It can also use a service address to create and join a Communication Group,
  42. which is the TIPC manifestation of a brokerless message bus.
  43. Multicast with very good performance and scalability is available both in
  44. datagram mode and in communication group mode.
  45. - Inter Node Links
  46. Communication between any two nodes in a cluster is maintained by one or two
  47. Inter Node Links, which both guarantee data traffic integrity and monitor
  48. the peer node's availability.
  49. - Cluster Scalability
  50. By applying the Overlapping Ring Monitoring algorithm on the inter node links
  51. it is possible to scale TIPC clusters up to 1000 nodes with a maintained
  52. neighbor failure discovery time of 1-2 seconds. For smaller clusters this
  53. time can be made much shorter.
  54. - Neighbor Discovery
  55. Neighbor Node Discovery in the cluster is done by Ethernet broadcast or UDP
  56. multicast, when any of those services are available. If not, configured peer
  57. IP addresses can be used.
  58. - Configuration
  59. When running TIPC in single node mode no configuration whatsoever is needed.
  60. When running in cluster mode TIPC must as a minimum be given a node address
  61. (before Linux 4.17) and told which interface to attach to. The "tipc"
  62. configuration tool makes is possible to add and maintain many more
  63. configuration parameters.
  64. - Performance
  65. TIPC message transfer latency times are better than in any other known protocol.
  66. Maximal byte throughput for inter-node connections is still somewhat lower than
  67. for TCP, while they are superior for intra-node and inter-container throughput
  68. on the same host.
  69. - Language Support
  70. The TIPC user API has support for C, Python, Perl, Ruby, D and Go.
  71. More Information
  72. ----------------
  73. - How to set up TIPC:
  74. http://tipc.io/getting_started.html
  75. - How to program with TIPC:
  76. http://tipc.io/programming.html
  77. - How to contribute to TIPC:
  78. http://tipc.io/contacts.html
  79. - More details about TIPC specification:
  80. http://tipc.io/protocol.html
  81. Implementation
  82. ==============
  83. TIPC is implemented as a kernel module in net/tipc/ directory.
  84. TIPC Base Types
  85. ---------------
  86. .. kernel-doc:: net/tipc/subscr.h
  87. :internal:
  88. .. kernel-doc:: net/tipc/bearer.h
  89. :internal:
  90. .. kernel-doc:: net/tipc/name_table.h
  91. :internal:
  92. .. kernel-doc:: net/tipc/name_distr.h
  93. :internal:
  94. .. kernel-doc:: net/tipc/bcast.c
  95. :internal:
  96. TIPC Bearer Interfaces
  97. ----------------------
  98. .. kernel-doc:: net/tipc/bearer.c
  99. :internal:
  100. .. kernel-doc:: net/tipc/udp_media.c
  101. :internal:
  102. TIPC Crypto Interfaces
  103. ----------------------
  104. .. kernel-doc:: net/tipc/crypto.c
  105. :internal:
  106. TIPC Discoverer Interfaces
  107. --------------------------
  108. .. kernel-doc:: net/tipc/discover.c
  109. :internal:
  110. TIPC Link Interfaces
  111. --------------------
  112. .. kernel-doc:: net/tipc/link.c
  113. :internal:
  114. TIPC msg Interfaces
  115. -------------------
  116. .. kernel-doc:: net/tipc/msg.c
  117. :internal:
  118. TIPC Name Interfaces
  119. --------------------
  120. .. kernel-doc:: net/tipc/name_table.c
  121. :internal:
  122. .. kernel-doc:: net/tipc/name_distr.c
  123. :internal:
  124. TIPC Node Management Interfaces
  125. -------------------------------
  126. .. kernel-doc:: net/tipc/node.c
  127. :internal:
  128. TIPC Socket Interfaces
  129. ----------------------
  130. .. kernel-doc:: net/tipc/socket.c
  131. :internal:
  132. TIPC Network Topology Interfaces
  133. --------------------------------
  134. .. kernel-doc:: net/tipc/subscr.c
  135. :internal:
  136. TIPC Server Interfaces
  137. ----------------------
  138. .. kernel-doc:: net/tipc/topsrv.c
  139. :internal:
  140. TIPC Trace Interfaces
  141. ---------------------
  142. .. kernel-doc:: net/tipc/trace.c
  143. :internal: