🗄 Databases — DBaaS chuẩn enterprise
LotusCloud cung cấp DBaaS tương đương AWS RDS / GCP Cloud SQL / Azure Database, với connection pooling (PgBouncer-equivalent), read replica, backup cross-zone, manual failover, parameter groups, monitoring + slow log.
Engines hỗ trợ
10+ engines, đa phiên bản| Engine | Phiên bản | Service | HA mode | Trạng thái |
|---|---|---|---|---|
| PostgreSQL | 9.6 – 15 | postgres-service :8120 | Streaming replication | Done |
| AlloyDB (PG-compat HA) | 14+ | alloydb-service | HA replica + failover | Done |
| MySQL / MariaDB | 5.7 / 8.0 / 10.x | mysql-service :8121 | Master/Slave + GTID | Done |
| MongoDB | 4.x – 6.0 | mongo-service :8116 | Replica set + sharding | Done |
| Redis | 5.x / 6.2 | redis-service :8122 | Sentinel / Cluster | Done |
| SQL Server | 2017 / 2019 (Linux) | sql-service (mssql) | Always On | Done |
| ClickHouse | 22.3 / 24.8 | bigquery-service | Sharded | Done |
| Vector DB | — | vector-db-service :8133 | Replicated | Done |
| Spanner-like | — | spanner-service | Globally consistent | Done |
| Oracle | 11g / 19c | sql-service (manual) | ADG | Roadmap |
| TiDB | 6.5 | Roadmap | Distributed | Roadmap |
| Elasticsearch | 7.16 / 8.13 | dataplex-service | Cluster | Partial |
Năng lực vận hành (5 cấp DBStack-Q)
I · Basic Install
Provisioning + parameter groups qua db-engine & per-engine service.
II · Seamless Upgrades
Rolling upgrade qua migration-service; downtime < 5s.
III · Read/Write Split + Backup
ConnectionPoolConfig, ReadReplica, backup-service, snapshot-service.
IV · Full Lifecycle
HA, auto-healing, account, audit/slow/error log: dr-service, monitor-service, audit-service.
V · Deep Insights
Alert, intelligent inspection, orchestration, auto-scaling, auto-pilot: policy-service, autoscale-service, composer-service, ai-agent-service.
Multi-tenant
Project model + X-Project-ID, RBAC + ABAC, workload identity ngắn hạn cho service-to-DB.
API tiêu biểu
# Tạo database
POST /api/v1/databases
{ "engine": "postgres", "version": "15", "size": "lc.db.medium" }
# Cấu hình connection pool (PgBouncer-equivalent)
PUT /api/v1/databases/:id/pool
{ "pool_mode": "transaction", "pool_size": 100, "idle_timeout": "300s" }
# Read replica
POST /api/v1/databases/:id/replicas
{ "region": "hn", "zone": "hn-1" }
# Manual failover
POST /api/v1/databases/:id/failover
{ "target_zone": "hcm-2" }
# Backup cross-zone
POST /api/v1/backups
{ "database_id": "...", "destination_region": "hn", "replication_mode": "async" }
Migration từ GCP / Azure / On-prem
Near-zero downtime
CDC streaming qua datastream-service; rehearsal → dual-write → cutover < 60s.