Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is REST stateless?

Tags:

rest

soap

I know REST and knows to create RESTful web services without using session, i know its better but I don't really understand the concept of stateless and how using REST can make your application scalable

Can someone explain these two aspects of REST, stateless and scalability and how is SOAP different and not advisable?

like image 908
Noor Avatar asked Feb 19 '23 02:02

Noor


1 Answers

A stateful API would maintain sessions for all connected clients. This would mean that the sessions need to be shared between servers, which limits scalability.

By storing this state on the client and sending it with each request, you can have the same state, but with better scalability.

like image 194
Tom van der Woerdt Avatar answered Feb 20 '23 17:02

Tom van der Woerdt