Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
What is a stateless server ?
Next article icon

What is a stateless server ?

Last Updated : 27 Mar, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

As the name suggests, the stateless server has no state with regard to the user’s information. It means when the user access any web resource, the server does not keep a track of the user’s identity or actions performed on the page. So every time, the user has to prove the identity to gain access.

Let’s understand it better in contrast with the stateful server. Stateful servers store users’ state information in the form of sessions. It stores information like profile, preference, user’s action and gives personalized experience on next visit. The user does not need credentials every time during the valid session.  

While stateless server treats each request as independent and demand user credentials. It requires no knowledge of previous interactions and stores no session information. So, there’s no difference between previous, current, and next requests.

Features of Stateless Server:

Performance: The server is not bound to maintain and synchronize any session data.  So it can serve any number of requests to the user. It helps in achieving a better response time with experience.  

Design: This is regarded as an advantage for developers as the stateless servers are easy to design and code because there is no need to dynamically maintain storage units in the backend. Stateless authentication uses REST (Representational State Transfer) to design the web APIs.  

Data Crash: Since no data is stored on the server, there is nil impact of a system crash on the performance of the web resource. The user can simply recover the access by reauthenticating. Stateless uses a different server on each request. So there's a scope of horizontal expansion.

Technology: The stateless servers can identify users based on a unique ID called Tokens. Tokens accommodate essential information of the user grants access after receiving the secret token. The validity of the token depends either on session duration or it gets destroyed once the user logs out of resource. This technology is known as cryptography which is going to be a major driver of future security mechanisms.

How does Stateless Server Works?

User visits a web page and the client-side interface on detecting a user responds with a credential window. The user gives a username, password and submits it for authentication. The server verifies the credentials from Database and gives access to the user. The server gives a unique token to verify the identity. The user on the next request can use the token to gain entry into the resource. This eliminates the need for the server to store information.

Here, the responsibility of authentication lies with the user who has to input the digital key to gain access and the database to match the key with the information. The information is stored in the database, not in the server, so the client has to make a call to the database every time manually either using credentials or a token.

The common way to identify users is through JASON Web Token (JWT) / OAuth stored on the client-side. This way the server relies on the user with a new request and does not rely on information from the earlier request.

Conclusion: So far we have covered the major know-hows of the Stateless model and its role in ensuring the security of the data. HTTP is known as a stateless server for the reason it demands the user’s identity on every visit. Hence, we can say that a stateless server is a modern aspect of web resources that are more critical from a security perspective.


Next Article
What is a stateless server ?

K

kiranjyotkaur
Improve
Article Tags :
  • Computer Networks
  • Geeks-Premier-League-2022

Similar Reads

    What is a Server?
    A server is a hardware device or software that processes requests sent over a network and replies to them. A client is the device that submits a request and waits for a response from the server. The computer system that accepts requests for online files and transmits those files to the client is ref
    8 min read
    What is a Serverless Database
    Have you ever read term serverless? The term serverless refers to a development model where an application or service is deployed in the cloud, with cloud resources like compute and storage automatically allocated in near-real-time based on demand. It's considered 'serverless' from a developer's per
    7 min read
    What is a Server OS?
    Server operating system is an extremely sophisticated operating system with multi-client support. With features and capabilities required in a client-server architecture or similar corporate computing environment, it is a more sophisticated operating system. In this article, we will learn about exam
    5 min read
    What is Serverless Computing ?
    Serverless computing simplifies managing digital services, similar to hiring a catering company for a party. Instead of handling all the details yourself, like cooking and serving, you can delegate tasks to a service provider and pay only for what's used. This means less hassle and more enjoyment fo
    8 min read
    What are Serverless Data Pipelines?
    A serverless data pipeline is a modern approach to managing and processing large volumes of data without the need for traditional server management. Leveraging cloud services, serverless data pipelines automatically scale to handle data workloads, optimizing cost and performance. These pipelines ena
    13 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences