You are not logged in.
does mORMot application work together on three or more servers ?
in many case , the service were required more than 1,000,000 times within one second, therefore one server cannot be handle the requires .
any solution for this ? sessions handle need be considered.
could I found the samples somewhere ?
Last edited by linbren (2017-08-16 03:52:46)
Windows 7 64bit. Delphi XE10.2 Professional.
Offline
what we mean is : does mORMot support distributed deployment ?
Windows 7 64bit. Delphi XE10.2 Professional.
Offline
Of course.
Just put a load balancer (e.g. ngxinx or haproxy) in front of the mORMot servers.
To maintain the session consistency, you my for instance, use IP hashing for routing, so that the same requests would go on the same mORMot server.
Offline
understand.
IP routing were limited , e.g. communication required between sessions , session A on server one , session B on server two , they does not know each other .
or more simply question : how many clients on our distributed system ?
we got a project which using java framework -- spring , sessions were maintain in Redis , it work pretty good .
Windows 7 64bit. Delphi XE10.2 Professional.
Offline
The idea with IP-hashed balancing is that the same client will point to the same server, so you could keep the session information on this server.
An alternative may be to store the session information on the client side, in a cookie: this is what our MVC framework does via TMVCSessionWithCookies (with optimized binary serialization, built-in expiration, then on-the-fly encryption and digital signature).
This is my preferred way: the more stateless a server is, the better!
You may also maintain the session information in a dedicated mORMot server, running a "sessions" MicroService, which may give you an higher level of abstraction than a Redis key/value store.
Offline