Oddbean new post about | logout
 @90991173 

Most php programmers in my experience dont have a clear separation of front and back that talk via a rest layer like we tend to do with modern web apps.

@ddc3da8f 
β–² β–Ό
 @b05df304 @ddc3da8f and if they do, they than do not separate data model and this will kill them during horizontal scaling because they are not stateless :-) you have idea how many state full micro services I have seen in my live in terms of for example login sessions. Technically impossible to horizontally scale. 
β–² β–Ό
 @90991173 @b05df304

my CMS is sessionless, I can scale up right away πŸ˜‚

(Sodium encrypted cookie for Auth) 
β–² β–Ό
 @90991173 @b05df304

well, Redis sessions will do

when Redis crashes, the whole system crashes

πŸ€”πŸ˜³ 
 @ddc3da8f 

thats why you run redis in a high availibility cluster itself... To create high availibility servers all your services need to be capable and running in high availiblity mode as well (usually means multiple servers all staying in sync somehow)

@90991173 
β–² β–Ό
 @b05df304 @ddc3da8f and we are back to Erlang/OTP and distributed Mnesia, never understood how someone can name data storage system like this :-) 
β–² β–Ό
 @90991173 @b05df304

PHP session cookie is the worst shit concept I have ever seen in my life 😎 
β–² β–Ό
 @90991173 @b05df304

I have seen PHP session problem solutions like MySQL storage, Redis, NFS, rsync and Syncthing.... πŸ˜‚ all the worst nightmares possible πŸ™† 
β–² β–Ό
 @90991173 @b05df304

authentication should be baked into Auth cookie, encrypted, protected

session data should be in local storage and sent when needed as an encrypted object 
β–² β–Ό
 @b05df304 @90991173

high availability hell πŸ˜‚

then you migrate everything to Cloudflare and pay $200 a month from Bali 
β–² β–Ό
 @b05df304 @90991173

There are only 3 important hard problems to solve in IT.

1. Correct addition and subtraction of 1.
2. Cache management.