Abstractions for scaling stateful cloud applications