3 ms·
Any kind of long held connection is state ;) So websocket, long http one, database connection, etc. Being able to tightly define what part of your app is impac
by di4na 5y ago
Any kind of long held connection is state ;)
So websocket, long http one, database connection, etc.
Being able to tightly define what part of your app is impacted if one of these fail and restore it before the rest of the app is impacted is a game changer.
OTP also deeply force you to think of how you start and how you stop these, taking dependencies into account. It helps in cleaning up stuff.
- bsaul 5y agosure. By state i really meant working end-user business-level data. Those are the kinds that really set the type of guarantees you need for your system. I guess i'll have to try OTP one time to understand why so many people rave about it. I only know one guy who had made real work with erlang / otp and he told me it was beautiful, but not quite as relevant anymore, because of k8s. But i guess i need to make my own opinion.
- ch4s3 5y agoIf the value you're looking for is just 0 downtime, then k8s solves that for you. As others have pointed out, the BEAM/Elixir/Erlang give you great process isolation and resilience to small failures, timeouts, weird transient issues, big short lived spikes traffic, and stuff like that. With respect to user data, a supervised process can crash and the supervisor can restart with the last known good state of that data. It requires some thought on the part of the developer to achieve this, but it's really powerful.
- nivertech 5y agoYou don't need k8s for 0 downtime, putting a monolith into an autoscaling group behind loadbalancer solves that ;)