Databases 12 min read

Instant DB Creation & Auto‑Scale: How Volcano PostgreSQL Serverless Supercharges Feishu MiaoDa AI Development

The article explains how AI‑generated code can be delivered in seconds, but traditional databases add a ten‑minute bottleneck, and shows that Volcano Cloud PostgreSQL Serverless reduces instance creation to 10 seconds, speeds up branch operations 200‑fold, offers scale‑to‑zero, cuts costs by 99.99%, and provides a Data‑as‑Git workflow with a step‑by‑step recovery demo.

ByteDance SE Lab
ByteDance SE Lab
ByteDance SE Lab
Instant DB Creation & Auto‑Scale: How Volcano PostgreSQL Serverless Supercharges Feishu MiaoDa AI Development

Problem: AI‑driven code generation outpaces traditional database provisioning

Vibe Coding users can generate full‑stack applications from natural‑language prompts in seconds, yet the underlying database initialization traditionally takes 5–10 minutes, breaking the development flow and inflating costs.

Solution: Volcano Cloud PostgreSQL Serverless

Volcano Cloud’s PostgreSQL Serverless edition redesigns the database service for the AI era. Since launch, it reduces instance creation time to 10 seconds (≈40× faster than conventional RDS), accelerates branch creation/deletion 200× , automatically scales inactive instances to zero, and lowers total cost by 99.99% . The service now supports millions of instances with enterprise‑grade high‑availability.

Key Features

Serverless – 90% cost reduction : On‑demand compute scaling and zero‑cost idle periods cut overall expenses by billions.

Data as Git – Branch‑level isolation : Each code branch maps to a database branch, enabling second‑level create/delete and ≤1 second rollback via Time Travel, with safe Schema Diff and Merge operations.

AI Function – Multi‑modal data access : Supports vector, graph, and text data retrieval; a single SQL query can trigger intelligent analysis, semantic understanding, and trend prediction, reducing agent integration time from weeks to 5 minutes .

Enterprise‑grade management : Handles over a million Vibe Coding projects and tens of thousands of concurrent active instances with stable performance.

Data as Git – Branch‑based workflow

The service treats database schemas like Git branches. Developers can create a branch, experiment with schema changes, and if an error occurs, revert to a previous version in under a second. This enables rapid trial‑and‑error without risking production data.

Demo: Recovering from accidental data loss

Step 1: Configure credentials

"""
场景:误删表的某一列后,通过分支能力极速恢复
预装依赖
pip install volcenginesdkcore volcenginesdkaidap psycopg2-binary
"""
import volcenginesdkcore
import volcenginesdkaidap
from volcenginesdkaidap import (
    CreateBranchRequest, DeleteBranchRequest,
    DescribeDBAccountConnectionRequest, DescribeComputesRequest,
    BranchSettingsForCreateBranchInput
)
import psycopg2
import time
# ========== Configuration (replace with your info) ==========
configuration = volcenginesdkcore.Configuration()
configuration.ak = "Your AK"
configuration.sk = "Your SK"
configuration.region = "cn-beijing"
configuration.host = "aidap.cn-beijing.volcengineapi.com"
configuration.client_side_validation = True
volcenginesdkcore.Configuration.set_default(configuration)
api = volcenginesdkaidap.AIDAPApi()
WORKSPACE_ID = "Your workspace ID"
MAIN_BRANCH_ID = "Your main branch ID"
DATABASE_NAME = "aidb"
ACCOUNT_NAME = "user_admin"

Step 2: Insert sample data into the main branch

# ========== Step 2: Create table and insert 5 rows ==========
conn = psycopg2.connect(PG_CONN)
conn.autocommit = True
cur = conn.cursor()
cur.execute("""
    CREATE TABLE IF NOT EXISTS employees (
        id SERIAL PRIMARY KEY,
        name TEXT NOT NULL,
        department TEXT NOT NULL,
        salary INT NOT NULL,
        email TEXT NOT NULL
    )
""")
cur.execute("""
    INSERT INTO employees (name, department, salary, email) VALUES
    ('Alice', 'Engineering', 25000, '[email protected]'),
    ('Bob', 'Product', 22000, '[email protected]'),
    ('Charlie', 'Design', 20000, '[email protected]'),
    ('Diana', 'Marketing', 23000, '[email protected]'),
    ('Edward', 'Operations', 21000, '[email protected]')
    ON CONFLICT DO NOTHING
""")
cur.execute("SELECT * FROM employees")
rows = cur.fetchall()
print("✅ Table created, current data:")
for row in rows:
    print(row)
cur.close()
conn.close()

Step 3: Simulate an accidental column drop on a dev branch

# ========== Step 3: Create dev branch and drop email column ==========
resp = api.create_branch(CreateBranchRequest(
    workspace_id=WORKSPACE_ID,
    branch_settings=BranchSettingsForCreateBranchInput(
        name="dev",
        parent_id=MAIN_BRANCH_ID,
    ),
))
dev_branch_id = resp.branch_id
print(f"📸 dev branch created: {dev_branch_id}")
PG_CONN_DEV = get_connection_url(dev_branch_id)
conn_dev = psycopg2.connect(PG_CONN_DEV)
conn_dev.autocommit = True
cur_dev = conn_dev.cursor()
cur_dev.execute("ALTER TABLE employees DROP COLUMN email")
print("⚠️ Executed: ALTER TABLE employees DROP COLUMN email")
cur_dev.execute("SELECT * FROM employees")
rows = cur_dev.fetchall()
print("
dev branch data (email column missing):")
for row in rows:
    print(row)
cur_dev.close()
conn_dev.close()

Step 4: Recover the lost column in under a second

# ========== Step 4: Create a new branch from main, data intact ==========
resp2 = api.create_branch(CreateBranchRequest(
    workspace_id=WORKSPACE_ID,
    branch_settings=BranchSettingsForCreateBranchInput(
        name="dev2",
        parent_id=MAIN_BRANCH_ID,
    ),
))
dev2_branch_id = resp2.branch_id
print(f"📸 dev2 branch created: {dev2_branch_id}")
PG_CONN_DEV2 = get_connection_url(dev2_branch_id)
conn_dev2 = psycopg2.connect(PG_CONN_DEV2)
conn_dev2.autocommit = True
cur_dev2 = conn_dev2.cursor()
cur_dev2.execute("SELECT * FROM employees")
rows = cur_dev2.fetchall()
print("
✅ dev2 branch data (email column restored):")
for row in rows:
    print(row)
cur_dev2.close()
conn_dev2.close()

The demo shows that a mistaken schema change can be undone instantly by creating a new branch from the untouched main branch, confirming the “Data as Git” promise of rapid recovery.

Future Outlook

Volcano PostgreSQL Serverless aims to support tens of millions of instances, higher‑performance vector search, and more intelligent AI analysis (NL2Everything covering over 90% of operations), turning the database from a manually prepared infrastructure into a data foundation that grows together with applications.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ServerlessPostgreSQLAI DevelopmentCloud DatabaseData as GitFeishu MiaoDa
ByteDance SE Lab
Written by

ByteDance SE Lab

Official account of ByteDance SE Lab, sharing research and practical experience in software engineering. Our lab unites researchers and engineers from various domains to accelerate the fusion of software engineering and AI, driving technological progress in every phase of software development.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.