I always read that one reason to chose a RESTful architecture is (among others) better scalability for Webapplications with a high load.
Why is that? One reason I can think of is that because of the defined resources which are the same for every client, caching is made easier. After the first request, subsequent requests are served from a memcached instance which also scales well horizontally.
But couldn't you also accomplish this with a traditional approach where actions are encoded in the url, e.g. (booking.php/userid=123&travelid=456&foobar=789).
REST also makes efficient use of bandwidth, as it's much less verbose than SOAP. Unlike SOAP, REST is designed to be stateless, and REST reads can be cached for better performance and scalability. REST supports many data formats, but the predominant use of JSON means better support for browser clients.
RESTful systems identify data as cacheable and respect cache tags. Cacheable data reduces network traffic and reduces the load on the back-end system. Intermediate nodes may return cached data in favor of back-end servers, increasing scalability, availability, reliability, and performance.
There are many advantages of relying on REST APIs. Some of them include scalability, flexibility, independence, and security. The details of how each of these is beneficial are below.
The main reason behind saying a rest application is scalable is, Its built upon a HTTP protocol. Because HTTP is stateless. Stateless means it wont share anything between other request. So any request can go to any Server in a load balanced cluster. There is nothing forcing this user request go to this server. We can overcome this by using token.
Because of this statelessness,All REST application are very easy to scale. But if you want get high throughput(number of request capable in one second) in each server, then you should optimize blocking things from the application. Follow the following tips
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With