A real benefit to the current approach is that you don't need to worry
about consistency. That's a _very_ good property in a security
product.
It's also not reasonable to think that all services should be
stateless. I won't discuss the many other services for which stateful
operation makes the most sense, but think about lease/token expiration
management within Vault. Do you really want Vault to poll every single
lease in its data store (all 100, or 1000, or 10000, or 100000, or
1000000) in a tight loop to check expiration status? Considering that
almost all data store backends in Vault are networked, the answer
should be a resounding "no". If you're running 100,000 transit
operations per minute through Vault, do you want Vault to perform a
new read(, parse, prepare) against its data store 100,000 times to
load the key fresh every time in case it's been rotated rather than
store its state in a cache and persist as needed? Again, the answer
should be a resounding "no".
Taking a stateful service and having proper master-slave or
master-master semantics is also hard, especially when you want to be
able to reason about the current state of the world, as you probably
do in a security product. Vault will support this if and when we have
an approach that we know is workable and correct, but not before.
Brief availability blips during a failover that can be worked around
by using client retries is better than outages due to split-brain
problems. Obviously HashiCorp has experience with Raft, but at the
same time, we have enough experience with it to know that simply
shoving it into Vault isn't an obviously right thing to do.
Stateless services have their place, but anyone that tells you that
all services should be stateless all the time does not have a good
grasp of real-world problems. Or is trying to sell you something.
--Jeff
>
https://groups.google.com/d/msgid/vault-tool/CABHxtY5s01FuVkYm-e-75GfLmvKcUFE7uLU4FuJ%3DgtDDuWL_mw%40mail.gmail.com.
>
https://groups.google.com/d/msgid/vault-tool/CABHxtY5s01FuVkYm-e-75GfLmvKcUFE7uLU4FuJ%3DgtDDuWL_mw%40mail.gmail.com.