Show HN: Xata, open-source Postgres platform with copy-on-write branches
hackernews
|
|
📦 오픈소스
#database
#kubernetes
#open source
#postgres
#review
원문 출처: hackernews · Genesis Park에서 요약 및 분석
요약
Xata는 쿠버네티스 기반의 오픈 소스 Postgres 플랫폼으로, 초대용량 데이터를 수 초 내에 복제하는 Copy-on-Write 브랜칭과 유휴 상태 시 컴퓨팅 비용을 줄이는 Scale-to-zero 기능을 지원합니다. CloudNativePG와 OpenEBS를 기반으로 구축되어 고가용성, 자동 장애 조치, REST API 관리 등의 기능을 제공하며, 현재 대규모 프로덕션 환경에서 안정적으로 사용되고 있습니다. 이 플랫폼은 기업 내부 Postgres 서비스 구축이나 개발 및 테스트 환경 생성에 적합하며, 단일 인스턴스 운영에는 과도한 기술이므로 권장하지 않습니다.
본문
Xata is a pure open-source, cloud-native, platform for self-hosting a large number of Postgres instances on top of Kubernetes, offering the following functionality (and more) built in: - Fast branching using Copy-on-Write at the storage level. You can “copy” TB of data in a matter of seconds - Scale-to-zero functionality (remove compute instance on inactivity, add it back automatically on connections) - Auto-scaling of the compute nodes, bin-packing them for cost efficiency - High-availability / Read-replicas with automatic failover - Upgrades, configuration edits, scale up/down with minimal downtime via switchover - Separation of storage and compute as well as local storage if preferred - PITR backups to object storage - Serverless driver (SQL over HTTP/websockets) - REST APIs and CLI for managing all “control-plane” operations, authenticated with API keys. API Keys support granular RBAC. It is stable, actively developed, and used in production at large scale already. It is powering the Xata Cloud service, which we recommend if you prefer a managed service. There are two major use cases for self-hosting the Xata open source platform: - create your own internal Postgres-as-a-Service for your company. In this case Xata provides a more opinionated and more feature-rich solution than using a K8s operator directly. - create preview, testing, and dev environments. By taking advantage of the copy-on-write storage and automatic scale-to-zero functionality, you can create “copies” of Postgres instances with TB of data in a matter of seconds and with incredible cost efficiency. When NOT to use Xata open source - If you just need a single Postgres instance. Xata is running on top of a Kubernetes cluster and would be overkill in that case. You can either simply self-host Postgres on your own, or use a managed Postgres service, like Xata Cloud. - If you want to create a public Postgres-as-a-Service to offer to end customers. While the license allows this use case (nor do we have any intention to change it in the future), we don’t recommend using it like this because we have kept closed-source some security features related to adversarial multi-tenancy. If you’d like to build a self-hosted PGaaS to offer to end customers, please contact us, likely the Xata BYOC offering is right for you. Xata is built on top of two key open-source cloud-native technologies: - CloudNativePG is a Postgres operator for Kubernetes. It handles most of the typical production concerns: high-availability, failover/switchover, upgrades, connection pooling, backups, etc. - OpenEBS, is a a cloud native storage project, offering both local storage (i.e. local NVMe disks) as well as a replicated storage engine (Mayastor - NVMe-of). On top of these two, the Xata platform adds: - SQL gateway, responsible for routing, ip filtering, waking up scaled-to-zero clusters, serving the serverless driver over HTTP/websockets, etc. - Branch operator managing all resources related to a branch. - clusters and projects services which form the control-plane and serve the REST APIs. - Auth service, based on Keycloak. - CLI that makes use of the REST API. - Scale-to-zero CNPG plugin for automatically hibernating branches on inactivity. For more details about the Xata architecture, see this blog post. To run locally, you need the following prerequisites: Step 1: create kind cluster kind create cluster --wait 10m Step 2: deploy via tilt tilt up Wait until all resources are up. This might take a long time when you run it for the first time, because it needs to download all the required images. Next time you start it, it should be much quicker. Step 3: install and authenticate the xata CLI: # Install CLI curl -fsSL https://xata.io/install.sh | bash # Authenticate to a local profile. Sign in with email [email protected] and password Xata1234! xata auth login --profile local --env local --force # Set the profile xata auth switch local Step 4: Create the first project and branch # Create project and main branch $ xata project create --name my-project # Create a child branch $ xata branch create Apache 2 If you are considering adopting Xata in your organization, we'd love to hear from you and help you. Please open either a GitHub discussion or contact us by email.
Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.
공유