Architectures Q1What are the implications of of using PHPs s

Architectures

Q1.What are the implications of of using PHP\'s session_start() function and session variables ($_SESSION[\'var\']) to identify a user\'s session in a load-balancing architecture with a statistical director? In particular, what will happen if one of the servers crashes? Describe a better way of representing the session information. (3 marks)

Solution

The implications of using PHP\'s session_start() function and session variables are given below:

1) With the help of session_start() function and session variables, all the servers can share the same session informations. As we can implement PHP to handle the sessions in the database. And that database is used by all the servers.

what will happen if one of the servers crashes?

If we are managing sessions by storing sessions information into the database then we get impacted only if our database gets crashes. If server crashes then we would not have any problem. We can also store session information on the shared file system like NFS. Fromw here we can read the session information if our servers reboots.

The better way for representing the session information is to store and retrive it from the database. If we are storing and retriving it from cache memory then it will cause problem if server crashes

Architectures Q1.What are the implications of of using PHP\'s session_start() function and session variables ($_SESSION[\'var\']) to identify a user\'s session

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site