You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RFC2810.txt 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. Network Working Group C. Kalt
  2. Request for Comments: 2810 April 2000
  3. Updates: 1459
  4. Category: Informational
  5. Internet Relay Chat: Architecture
  6. Status of this Memo
  7. This memo provides information for the Internet community. It does
  8. not specify an Internet standard of any kind. Distribution of this
  9. memo is unlimited.
  10. Copyright Notice
  11. Copyright (C) The Internet Society (2000). All Rights Reserved.
  12. Abstract
  13. The IRC (Internet Relay Chat) protocol is for use with text based
  14. conferencing. It has been developed since 1989 when it was originally
  15. implemented as a mean for users on a BBS to chat amongst themselves.
  16. First formally documented in May 1993 by RFC 1459 [IRC], the protocol
  17. has kept evolving. This document is an update describing the
  18. architecture of the current IRC protocol and the role of its
  19. different components. Other documents describe in detail the
  20. protocol used between the various components defined here.
  21. Table of Contents
  22. 1. Introduction ............................................... 2
  23. 2. Components ................................................. 2
  24. 2.1 Servers ................................................ 2
  25. 2.2 Clients ................................................ 3
  26. 2.2.1 User Clients ...................................... 3
  27. 2.2.2 Service Clients ................................... 3
  28. 3. Architecture ............................................... 3
  29. 4. IRC Protocol Services ...................................... 4
  30. 4.1 Client Locator ......................................... 4
  31. 4.2 Message Relaying ....................................... 4
  32. 4.3 Channel Hosting And Management ......................... 4
  33. 5. IRC Concepts ............................................... 4
  34. 5.1 One-To-One Communication ............................... 5
  35. 5.2 One-To-Many ............................................ 5
  36. 5.2.1 To A Channel ...................................... 5
  37. 5.2.2 To A Host/Server Mask ............................. 6
  38. Kalt Informational [Page 1]
  39. RFC 2810 Internet Relay Chat: Architecture April 2000
  40. 5.2.3 To A List ......................................... 6
  41. 5.3 One-To-All ............................................. 6
  42. 5.3.1 Client-to-Client .................................. 6
  43. 5.3.2 Client-to-Server .................................. 7
  44. 5.3.3 Server-to-Server .................................. 7
  45. 6. Current Problems ........................................... 7
  46. 6.1 Scalability ............................................ 7
  47. 6.2 Reliability ............................................ 7
  48. 6.3 Network Congestion ..................................... 7
  49. 6.4 Privacy ................................................ 8
  50. 7. Security Considerations .................................... 8
  51. 8. Current Support And Availability ........................... 8
  52. 9. Acknowledgements ........................................... 8
  53. 10. References ................................................ 8
  54. 11. Author's Address .......................................... 9
  55. 12. Full Copyright Statement .................................. 10
  56. 1. Introduction
  57. The IRC (Internet Relay Chat) protocol has been designed over a
  58. number of years for use with text based conferencing. This document
  59. describes its current architecture.
  60. The IRC Protocol is based on the client-server model, and is well
  61. suited to running on many machines in a distributed fashion. A
  62. typical setup involves a single process (the server) forming a
  63. central point for clients (or other servers) to connect to,
  64. performing the required message delivery/multiplexing and other
  65. functions.
  66. This distributed model, which requires each server to have a copy
  67. of the global state information, is still the most flagrant problem
  68. of the protocol as it is a serious handicap, which limits the maximum
  69. size a network can reach. If the existing networks have been able to
  70. keep growing at an incredible pace, we must thank hardware
  71. manufacturers for giving us ever more powerful systems.
  72. 2. Components
  73. The following paragraphs define the basic components of the IRC
  74. protocol.
  75. 2.1 Servers
  76. The server forms the backbone of IRC as it is the only component
  77. of the protocol which is able to link all the other components
  78. together: it provides a point to which clients may connect to talk to
  79. Kalt Informational [Page 2]
  80. RFC 2810 Internet Relay Chat: Architecture April 2000
  81. each other [IRC-CLIENT], and a point for other servers to connect to
  82. [IRC-SERVER]. The server is also responsible for providing the basic
  83. services defined by the IRC protocol.
  84. 2.2 Clients
  85. A client is anything connecting to a server that is not another
  86. server. There are two types of clients which both serve a different
  87. purpose.
  88. 2.2.1 User Clients
  89. User clients are generally programs providing a text based
  90. interface that is used to communicate interactively via IRC. This
  91. particular type of clients is often referred as "users".
  92. 2.2.2 Service Clients
  93. Unlike users, service clients are not intended to be used manually
  94. nor for talking. They have a more limited access to the chat
  95. functions of the protocol, while optionally having access to more
  96. private data from the servers.
  97. Services are typically automatons used to provide some kind of
  98. service (not necessarily related to IRC itself) to users. An example
  99. is a service collecting statistics about the origin of users
  100. connected on the IRC network.
  101. 3. Architecture
  102. An IRC network is defined by a group of servers connected to each
  103. other. A single server forms the simplest IRC network.
  104. The only network configuration allowed for IRC servers is that of
  105. a spanning tree where each server acts as a central node for the rest
  106. of the network it sees.
  107. 1--\
  108. A D---4
  109. 2--/ \ /
  110. B----C
  111. / \
  112. 3 E
  113. Servers: A, B, C, D, E Clients: 1, 2, 3, 4
  114. [ Fig. 1. Sample small IRC network ]
  115. Kalt Informational [Page 3]
  116. RFC 2810 Internet Relay Chat: Architecture April 2000
  117. The IRC protocol provides no mean for two clients to directly
  118. communicate. All communication between clients is relayed by the
  119. server(s).
  120. 4. IRC Protocol Services
  121. This section describes the services offered by the IRC protocol. The
  122. combination of these services allow real-time conferencing.
  123. 4.1 Client Locator
  124. To be able to exchange messages, two clients must be able to locate
  125. each other.
  126. Upon connecting to a server, a client registers using a label which
  127. is then used by other servers and clients to know where the client is
  128. located. Servers are responsible for keeping track of all the labels
  129. being used.
  130. 4.2 Message Relaying
  131. The IRC protocol provides no mean for two clients to directly
  132. communicate. All communication between clients is relayed by the
  133. server(s).
  134. 4.3 Channel Hosting And Management
  135. A channel is a named group of one or more users which will all
  136. receive messages addressed to that channel. A channel is
  137. characterized by its name and current members, it also has a set of
  138. properties which can be manipulated by (some of) its members.
  139. Channels provide a mean for a message to be sent to several clients.
  140. Servers host channels, providing the necessary message multiplexing.
  141. Servers are also responsible for managing channels by keeping track
  142. of the channel members. The exact role of servers is defined in
  143. "Internet Relay Chat: Channel Management" [IRC-CHAN].
  144. 5. IRC Concepts
  145. This section is devoted to describing the actual concepts behind the
  146. organization of the IRC protocol and how different classes of
  147. messages are delivered.
  148. Kalt Informational [Page 4]
  149. RFC 2810 Internet Relay Chat: Architecture April 2000
  150. 5.1 One-To-One Communication
  151. Communication on a one-to-one basis is usually performed by clients,
  152. since most server-server traffic is not a result of servers talking
  153. only to each other. To provide a means for clients to talk to each
  154. other, it is REQUIRED that all servers be able to send a message in
  155. exactly one direction along the spanning tree in order to reach any
  156. client. Thus the path of a message being delivered is the shortest
  157. path between any two points on the spanning tree.
  158. The following examples all refer to Figure 1 above.
  159. Example 1: A message between clients 1 and 2 is only seen by server
  160. A, which sends it straight to client 2.
  161. Example 2: A message between clients 1 and 3 is seen by servers A &
  162. B, and client 3. No other clients or servers are allowed see the
  163. message.
  164. Example 3: A message between clients 2 and 4 is seen by servers A, B,
  165. C & D and client 4 only.
  166. 5.2 One-To-Many
  167. The main goal of IRC is to provide a forum which allows easy and
  168. efficient conferencing (one to many conversations). IRC offers
  169. several means to achieve this, each serving its own purpose.
  170. 5.2.1 To A Channel
  171. In IRC the channel has a role equivalent to that of the multicast
  172. group; their existence is dynamic and the actual conversation carried
  173. out on a channel MUST only be sent to servers which are supporting
  174. users on a given channel. Moreover, the message SHALL only be sent
  175. once to every local link as each server is responsible to fan the
  176. original message to ensure that it will reach all the recipients.
  177. The following examples all refer to Figure 2.
  178. Example 4: Any channel with 1 client in it. Messages to the channel
  179. go to the server and then nowhere else.
  180. Example 5: 2 clients in a channel. All messages traverse a path as if
  181. they were private messages between the two clients outside a
  182. channel.
  183. Kalt Informational [Page 5]
  184. RFC 2810 Internet Relay Chat: Architecture April 2000
  185. Example 6: Clients 1, 2 and 3 in a channel. All messages to the
  186. channel are sent to all clients and only those servers which must
  187. be traversed by the message if it were a private message to a
  188. single client. If client 1 sends a message, it goes back to
  189. client 2 and then via server B to client 3.
  190. 5.2.2 To A Host/Server Mask
  191. To provide with some mechanism to send messages to a large body of
  192. related users, host and server mask messages are available. These
  193. messages are sent to users whose host or server information match
  194. that of the mask. The messages are only sent to locations where
  195. users are, in a fashion similar to that of channels.
  196. 5.2.3 To A List
  197. The least efficient style of one-to-many conversation is through
  198. clients talking to a 'list' of targets (client, channel, mask). How
  199. this is done is almost self explanatory: the client gives a list of
  200. destinations to which the message is to be delivered and the server
  201. breaks it up and dispatches a separate copy of the message to each
  202. given destination.
  203. This is not as efficient as using a channel since the destination
  204. list MAY be broken up and the dispatch sent without checking to make
  205. sure duplicates aren't sent down each path.
  206. 5.3 One-To-All
  207. The one-to-all type of message is better described as a broadcast
  208. message, sent to all clients or servers or both. On a large network
  209. of users and servers, a single message can result in a lot of traffic
  210. being sent over the network in an effort to reach all of the desired
  211. destinations.
  212. For some class of messages, there is no option but to broadcast it to
  213. all servers so that the state information held by each server is
  214. consistent between servers.
  215. 5.3.1 Client-to-Client
  216. There is no class of message which, from a single message, results in
  217. a message being sent to every other client.
  218. Kalt Informational [Page 6]
  219. RFC 2810 Internet Relay Chat: Architecture April 2000
  220. 5.3.2 Client-to-Server
  221. Most of the commands which result in a change of state information
  222. (such as channel membership, channel mode, user status, etc.) MUST be
  223. sent to all servers by default, and this distribution SHALL NOT be
  224. changed by the client.
  225. 5.3.3 Server-to-Server
  226. While most messages between servers are distributed to all 'other'
  227. servers, this is only required for any message that affects a user,
  228. channel or server. Since these are the basic items found in IRC,
  229. nearly all messages originating from a server are broadcast to all
  230. other connected servers.
  231. 6. Current Problems
  232. There are a number of recognized problems with this protocol, this
  233. section only addresses the problems related to the architecture of
  234. the protocol.
  235. 6.1 Scalability
  236. It is widely recognized that this protocol does not scale
  237. sufficiently well when used in a large arena. The main problem comes
  238. from the requirement that all servers know about all other servers,
  239. clients and channels and that information regarding them be updated
  240. as soon as it changes.
  241. 6.2 Reliability
  242. As the only network configuration allowed for IRC servers is that of
  243. a spanning tree, each link between two servers is an obvious and
  244. quite serious point of failure. This particular issue is addressed
  245. more in detail in "Internet Relay Chat: Server Protocol" [IRC-
  246. SERVER].
  247. 6.3 Network Congestion
  248. Another problem related to the scalability and reliability issues, as
  249. well as the spanning tree architecture, is that the protocol and
  250. architecture for IRC are extremely vulnerable to network congestions.
  251. This problem is endemic, and should be solved for the next
  252. generation: if congestion and high traffic volume cause a link
  253. between two servers to fail, not only this failure generates more
  254. network traffic, but the reconnection (eventually elsewhere) of two
  255. servers also generates more traffic.
  256. Kalt Informational [Page 7]
  257. RFC 2810 Internet Relay Chat: Architecture April 2000
  258. In an attempt to minimize the impact of these problems, it is
  259. strongly RECOMMENDED that servers do not automatically try to
  260. reconnect too fast, in order to avoid aggravating the situation.
  261. 6.4 Privacy
  262. Besides not scaling well, the fact that servers need to know all
  263. information about other entities, the issue of privacy is also a
  264. concern. This is in particular true for channels, as the related
  265. information is quite a lot more revealing than whether a user is
  266. online or not.
  267. 7. Security Considerations
  268. Asides from the privacy concerns mentioned in section 6.4 (Privacy),
  269. security is believed to be irrelevant to this document.
  270. 8. Current Support And Availability
  271. Mailing lists for IRC related discussion:
  272. General discussion: ircd-users@irc.org
  273. Protocol development: ircd-dev@irc.org
  274. Software implementations:
  275. ftp://ftp.irc.org/irc/server
  276. ftp://ftp.funet.fi/pub/unix/irc
  277. ftp://coombs.anu.edu.au/pub/irc
  278. Newsgroup: alt.irc
  279. 9. Acknowledgements
  280. Parts of this document were copied from the RFC 1459 [IRC] which
  281. first formally documented the IRC Protocol. It has also benefited
  282. from many rounds of review and comments. In particular, the
  283. following people have made significant contributions to this
  284. document:
  285. Matthew Green, Michael Neumayer, Volker Paulsen, Kurt Roeckx, Vesa
  286. Ruokonen, Magnus Tjernstrom, Stefan Zehl.
  287. Kalt Informational [Page 8]
  288. RFC 2810 Internet Relay Chat: Architecture April 2000
  289. 10. References
  290. [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
  291. Requirement Levels", BCP 14, RFC 2119, March 1997.
  292. [IRC] Oikarinen, J. and D. Reed, "Internet Relay Chat
  293. Protocol", RFC 1459, May 1993.
  294. [IRC-CLIENT] Kalt, C., "Internet Relay Chat: Client Protocol", RFC
  295. 2812, April 2000.
  296. [IRC-SERVER] Kalt, C., "Internet Relay Chat: Server Protocol", RFC
  297. 2813, April 2000.
  298. [IRC-CHAN] Kalt, C., "Internet Relay Chat: Channel Management", RFC
  299. 2811, April 2000.
  300. 11. Author's Address
  301. Christophe Kalt
  302. 99 Teaneck Rd, Apt #117
  303. Ridgefield Park, NJ 07660
  304. USA
  305. EMail: kalt@stealth.net
  306. Kalt Informational [Page 9]
  307. RFC 2810 Internet Relay Chat: Architecture April 2000
  308. 12. Full Copyright Statement
  309. Copyright (C) The Internet Society (2000). All Rights Reserved.
  310. This document and translations of it may be copied and furnished to
  311. others, and derivative works that comment on or otherwise explain it
  312. or assist in its implementation may be prepared, copied, published
  313. and distributed, in whole or in part, without restriction of any
  314. kind, provided that the above copyright notice and this paragraph are
  315. included on all such copies and derivative works. However, this
  316. document itself may not be modified in any way, such as by removing
  317. the copyright notice or references to the Internet Society or other
  318. Internet organizations, except as needed for the purpose of
  319. developing Internet standards in which case the procedures for
  320. copyrights defined in the Internet Standards process must be
  321. followed, or as required to translate it into languages other than
  322. English.
  323. The limited permissions granted above are perpetual and will not be
  324. revoked by the Internet Society or its successors or assigns.
  325. This document and the information contained herein is provided on an
  326. "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  327. TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  328. BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  329. HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  330. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  331. Acknowledgement
  332. Funding for the RFC Editor function is currently provided by the
  333. Internet Society.
  334. Kalt Informational [Page 10]