ruby - How does Rails handle multiple incoming requests? -


how rails, handle multiple requests different users without colliding? logic?

e.g., user1 logged in , browses site. @ same time, user2, user3, ... log in , browse. how rails manage situation without data conflict between users?

one thing bear in mind here though users using site simultaneously in browsers, server may still handling single request @ time. request processing may take less second, requests can queued processed without causing significant delays users. each response starts blank slate, taking information request , using data database. not carry on 1 request next. called "stateless" paradigm.

if load increases, more rails servers can added. because each response starts scratch anyway, adding more servers doesn't create problems "sharing of information", since information either sent in request or loaded database. means more requests can handled per second.

when feeling of "continuity" user, example staying logged website, done via cookies, stored on machine , sent through part of request. server can read cookie information request and, example, not redirect login page cookie telling them have logged in user 123 or whatever.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -