arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.02397cs.DB
收藏

映像万岁:生产中的容器原生数据持久性

Long Live The Image: Container-Native Data Persistence in Production

Zheng Li

摘要:

容器化在实现微服务架构的实际技术栈中起着至关重要的作用(在大多数情况下,每个微服务都有自己的数据库)。尽管如此,对生产数据库的容器化仍然存在激烈的争论,主要是由于数据持久性问题和担忧。在一个自动化机器学习系统重构项目的推动下,本研究提出了容器原生数据持久化作为在生产环境中运行数据库容器的条件解决方案。本质上,所提出的解决方案区分了数据库中的无状态数据访问(即读取)和有状态数据处理(即创建、更新和删除)。主数据库处理有状态数据处理并转储数据库副本以构建容器映像,而数据库容器将基于映像中的预加载转储在运行时保持无状态。虽然在状态/映像更新传播中存在延迟,但是该解决方案特别适合于只读、最终一致性和异步处理场景。此外,通过最佳调谐(例如,禁用锁定),只读数据库容器的可移植性和性能增益将超过跨底层映像层访问数据时的性能损失。

英文摘要:

Containerization plays a crucial role in the de facto technology stack for implementing microservices architecture (each microservice has its own database in most cases). Nevertheless, there are still fierce debates on containerizing production databases, mainly due to the data persistence issues and concerns. Driven by a project of refactoring an Automated Machine Learning system, this research proposes the container-native data persistence as a conditional solution to running database containers in production. In essence, the proposed solution distinguishes the stateless data access (i.e. reading) from the stateful data processing (i.e. creating, updating, and deleting) in databases. A master database handles the stateful data processing and dumps database copies for building container images, while the database containers will keep stateless at runtime, based on the preloaded dump in the image. Although there are delays in the state/image update propagation, this solution is particularly suitable for the read-only, the eventual consistency, and the asynchronous processing scenarios. Moreover, with optimal tuning (e.g., disabling locking), the portability and performance gains of a read-only database container would outweigh the performance loss in accessing data across the underlying image layers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑