Welcome Guest, Not a member yet? Register   Sign In
CI 3 native session driver?
#9

(This post was last modified: 09-03-2015, 12:31 PM by mwhitney.)

If I'm reading the documentation of Memcached and the session driver code correctly, Memcached's failover support is handled by Memcached itself as long as you use the addServer() method, which CI's session driver does.

I suspect that the primary concern here would be that if, somehow, the host:port combination supplied to the sess_save_path config value was unavailable when the session was initially opened, you would not be able to access the session, even if other servers in the Memcached pool were available. However (again, if I'm reading the code correctly), I don't even believe that will be an issue, as it only appears to be checking whether the supplied host:port is in the existing list of servers in the Memcached instance and logs an error message if it fails to add the server. As long as the server list retrieved from Memcached is not empty, the open() method of the session handler returns true, so it should continue even if the host:port combination configured in sess_save_path is unavailable.

Also, regardless of which session handler you're using, there's never a guarantee that Memcached won't lose session data just because you're using server pools.
Reply


Messages In This Thread
CI 3 native session driver? - by blasto333 - 09-02-2015, 04:01 PM
RE: CI 3 native session driver? - by CroNiX - 09-03-2015, 09:18 AM
RE: CI 3 native session driver? - by blasto333 - 09-03-2015, 09:26 AM
RE: CI 3 native session driver? - by CroNiX - 09-03-2015, 09:39 AM
RE: CI 3 native session driver? - by blasto333 - 09-03-2015, 09:41 AM
RE: CI 3 native session driver? - by CroNiX - 09-03-2015, 09:50 AM
RE: CI 3 native session driver? - by mwhitney - 09-03-2015, 11:52 AM
RE: CI 3 native session driver? - by blasto333 - 09-03-2015, 11:58 AM
RE: CI 3 native session driver? - by mwhitney - 09-03-2015, 12:31 PM
RE: CI 3 native session driver? - by blasto333 - 09-03-2015, 07:10 PM
RE: CI 3 native session driver? - by kilishan - 09-04-2015, 07:15 AM
RE: CI 3 native session driver? - by blasto333 - 09-07-2015, 01:18 PM
RE: CI 3 native session driver? - by blasto333 - 09-07-2015, 07:19 PM
RE: CI 3 native session driver? - by mwhitney - 09-08-2015, 07:51 AM
RE: CI 3 native session driver? - by blasto333 - 09-08-2015, 07:56 AM
RE: CI 3 native session driver? - by mwhitney - 09-08-2015, 09:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB