TL;DR
This paper introduces FaaSKeeper, a serverless implementation of Apache ZooKeeper, a critical coordination service for distributed systems. By leveraging cloud-native serverless functions and storage, FaaSKeeper offers comparable consistency guarantees to traditional ZooKeeper but at a significantly reduced cost, especially for infrequent workloads.
What Problem Does This Paper Address?
Distributed systems often rely on coordination services like ZooKeeper to manage shared state, ensure data consistency, and handle leader election. However, traditional ZooKeeper deployments require provisioning and managing dedicated servers, leading to underutilization and high costs, especially for applications with variable or infrequent workloads. The rise of serverless computing offers a compelling alternative with its elastic scaling and pay-as-you-go model, but adapting complex, stateful systems like ZooKeeper to this paradigm presents significant challenges. This paper addresses the gap of building a robust, consistent, and cost-effective coordination service using serverless technologies.
Methods
The authors propose FaaSKeeper, a serverless architecture that disaggregates ZooKeeper's components and maps them to cloud-native serverless services. Key techniques include:
- Disaggregation: ZooKeeper's leader and follower roles are implemented as independent serverless functions.
- Serverless Storage: Cloud object storage (like AWS S3) and key-value stores (like AWS DynamoDB) are used for persistent data storage, replacing dedicated servers.
- Cloud Queues: Serverless queues (like AWS SQS FIFO) are employed for inter-function communication, ensuring ordered message delivery.
- Synchronization Primitives: Custom synchronization primitives (timed locks, atomic counters) are implemented using cloud storage's conditional update features to maintain consistency.
- API Compatibility: FaaSKeeper maintains ZooKeeper's API, allowing existing applications to migrate with minimal changes.
- Hybrid Storage: A combination of key-value and object storage is used to optimize for different node sizes and access patterns, balancing cost and performance.
Datasets
Not discussed in the paper. The evaluation relies on microbenchmarks and performance profiling of FaaSKeeper components and ZooKeeper itself.
Key Insights and Ideas
- Serverless is Viable for Complex Coordination: The paper demonstrates that even complex, stateful systems like ZooKeeper can be successfully re-implemented using serverless architectures, challenging prior assumptions about serverless limitations.
- Cost Savings are Substantial: For workloads with infrequent access, FaaSKeeper offers dramatic cost reductions (up to 719x) compared to traditional ZooKeeper deployments, primarily due to its pay-as-you-go model and elastic scaling.
- Trade-offs Exist: While FaaSKeeper excels in cost and scalability for variable workloads, it introduces higher latency for individual operations compared to in-memory ZooKeeper due to function invocation overheads and cloud service latencies.
- Hybrid Storage is Crucial: Optimizing FaaSKeeper's performance and cost requires a hybrid storage approach, leveraging key-value stores for small, frequently accessed data and object storage for larger data.
- Cloud-Native Services are Key: The success of FaaSKeeper hinges on the capabilities of cloud-native services like strongly consistent storage and FIFO queues.
Key Results
- Cost Reduction: FaaSKeeper achieves up to 719x lower costs than ZooKeeper for infrequent workloads.
- Performance: While FaaSKeeper's write latency is higher than ZooKeeper's due to serverless overheads, its read performance can be competitive with ZooKeeper when using in-memory caches.
- Scalability: FaaSKeeper scales elastically with demand, automatically adjusting resource allocation.
- Compatibility: FaaSKeeper provides an API-compatible interface with ZooKeeper.
- Requirements for Serverless: The paper outlines nine key requirements for future serverless platforms to better support complex distributed applications.
Limitations and Future Work
- Latency: FaaSKeeper's latency for individual operations is higher than traditional ZooKeeper, particularly for writes, due to function invocation overheads and cloud service latencies.
- In-Memory Cache Availability: The paper notes that while an in-memory cache can match ZooKeeper's read performance, such services are not yet widely available as native serverless offerings.
- Future Work: The authors suggest that future serverless platforms could improve FaaSKeeper's performance and efficiency by offering faster invocations, better exception handling, more efficient synchronization primitives, improved queueing mechanisms, and native support for stateful functions and partial storage updates. They also highlight the need for cloud providers to offer more competitive serverless storage options.
Summary updated