2 ms·
> Give an example. I can give an example. The part about sticky sessions is good generic advice for someone building generic web services, but there are situat
by Aurornis 3y ago
> Give an example.
I can give an example. The part about sticky sessions is good generic advice for someone building generic web services, but there are situations where sticky session-like functionality or sharding-like behavior might be a better choice. Anyone adhering literally to the 12-factor guide would get hung up on trying to move that data to redis or memcached:
> Some web systems rely on “sticky sessions” – that is, caching user session data in memory of the app’s process and expecting future requests from the same visitor to be routed to the same process. Sticky sessions are a violation of twelve-factor and should never be used or relied upon. Session state data is a good candidate for a datastore that offers time-expiration, such as Memcached or Redis.
The guide also has a strong preference for languages like Ruby, Perl, and Python. There’s even a quip about how 12-factor prefers languages with a REPL, which in the wrong hands becomes an argument against using Rust or other languages.
People who think the entire world is simple CRUD web apps tend to think that guides like this are completely universal. It’s a good guide for people making common web apps, but it’s not a perfect methodology for every backend service.
- brodouevencode 3y ago> People who think the entire world is simple CRUD web apps tend to think that guides like this are completely universal That's the very first point they make: > In the modern era, software is commonly delivered as a service: called web apps, or software-as-a-service. The twelve-factor app is a methodology for building software-as-a-service apps that... Anything not web app/SaaS they express no opinion on.
- willseth 3y agoI think it depends on how you interpret "rely". If your app can gracefully recover to a reasonable state from a failure to resume the expected session, then you could argue it's not that reliant on it. Many systems use sticky sessions as simply as an optimization, which is fine. You didn't actually give an complete example. When are sticky sessions a better choice than persistence?