Stateless Definition

Stateless means that a protocol (i.e., an agreed upon format or set of rules) or application program keeps no information one or more preceding events in a given sequence of interactions with a user, another computer, another program, device, etc.

Statelessness is the opposite of maintaining state. It offers the advantages that it can simplify programming and that it can reduce network traffic.

State is maintained by most modern application programs in order to ensure data consistency and facilitate ease of use. A major benefit is that it allows programs to remember what users were doing earlier in the same session in a program or in the previous times they ran the program. For example, it allows programs to retain the user's configuration settings.

In contrast, much of the Internet and web is intrinsically stateless. For example, HTTP (hypertext transfer protocol) by itself provides no means for maintaining state, and thus, without the use of special coding, each request for a new web page is processed without any knowledge of the pages previously requested. Because maintaining state is extremely useful, programmers have developed a number of techniques to add state to the web, including cookies and server APIs (application programming interfaces).

User datagram protocol (UDP), one of the core protocols of the Internet, is a stateless, transport layer protocol that runs on top of IP networks. Its stateless nature is useful for servers that respond to large numbers of small queries.

Created October 7, 2005.
Copyright © 2005 The Linux Information Project. All Rights Reserved.