{"id":35087,"date":"2026-09-24T13:52:55","date_gmt":"2026-09-24T20:52:55","guid":{"rendered":"https:\/\/www.pingcap.com\/?p=35087"},"modified":"2026-09-25T13:54:05","modified_gmt":"2026-09-25T20:54:05","slug":"build-with-tidb-cloud-starter-vercel-database","status":"publish","type":"post","link":"https:\/\/www.pingcap.com\/ko\/blog\/build-with-tidb-cloud-starter-vercel-database\/","title":{"rendered":"Vercel and TiDB Cloud Starter: The Full-Stack Playbook for AI Apps"},"content":{"rendered":"<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Key_Takeaways\"><\/span>\ud575\uc2ec \uc694\uc57d<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Edge runtimes break TCP pools. TiDB Cloud Starter connects over HTTPS instead.<\/li>\n\n\n\n<li>Swapping a v0.dev starter database for TiDB is a connection string change.<\/li>\n\n\n\n<li>A native <code>VECTOR<\/code> type keeps embeddings beside your rows, with no store to sync.<\/li>\n\n\n\n<li>The Vercel Marketplace integration writes the connection variables for you.<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">You have an AI app running on Vercel, or a prototype that v0.dev generated in a few minutes, and now it needs a real database. The choice is harder than it looks, because serverless functions and edge runtimes break the assumptions traditional databases are built on: long-lived TCP connections, a bounded pool, and a process that stays warm between requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This playbook covers the full path. Pick a Vercel database that survives serverless and edge runtimes, model the data an AI app actually stores, put embeddings next to that data instead of in a separate vector store, connect from Vercel Edge Functions and Cloudflare Workers, and deploy through the Vercel Marketplace integration that wires the environment variables for you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.pingcap.com\/ko\/what-is-tidb\/\">\ud2f0DB<\/a> is an open source distributed SQL database with transactional and analytical processing in one engine. TiDB Cloud Starter is its fully managed, auto-scaling deployment option, MySQL compatible and provisioned in about a second. <a href=\"https:\/\/vercel.com\/home\">\ubca0\ub974\uc140<\/a> is the creator of Next.js and the platform most AI apps deploy to. The two fit together well, and the rest of this post shows exactly how.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_a_Vercel_App_Needs_a_Serverless_Database_Built_for_the_Edge\"><\/span>Why a Vercel App Needs a Serverless Database Built for the Edge<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Vercel runs your backend as serverless and edge functions rather than a long-running server, and that changes what a database has to support. A serverless function executes on demand, scales automatically, and terminates when the request finishes. A traditional API keeps a process alive behind a request-response interface, holds its connection pool open, and reuses connections across requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Three differences matter when you pick a database:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Lifecycle.<\/strong> A serverless function runs a specific piece of code in response to an event and exits. A traditional API stays resident and manages its own infrastructure.<\/li>\n\n\n\n<li><strong>Portability.<\/strong> Serverless functions bind to a platform runtime. A traditional API runs anywhere you can host a process.<\/li>\n\n\n\n<li><strong>Deployment speed.<\/strong> Serverless functions ship in shorter cycles because there is no infrastructure to provision, which is why AI apps iterate on them.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Connection Pooling Is the Problem Serverless Exposes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Each function invocation opens its own database connection. Under bursty traffic, a few hundred concurrent invocations become a few hundred connections, and a traditional MySQL or Postgres instance starts refusing them. Teams usually respond by adding an external pooler, which adds a hop, a component to operate, and a new failure mode.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">TiDB Cloud Starter takes a different path with the <a href=\"https:\/\/docs.pingcap.com\/tidbcloud\/serverless-driver\/\">TiDB Cloud serverless driver<\/a>, which talks to the database over HTTPS instead of TCP. There is no pool to exhaust because there is no persistent connection in the path. Each invocation makes an HTTPS request, gets its result, and ends.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Runtimes This Playbook Covers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Everything below works on three targets: Vercel serverless functions (Node.js runtime), Vercel Edge Functions, and Cloudflare Workers. Edge runtimes are the strict case, because they do not allow raw TCP sockets at all. A driver that speaks HTTPS is not an optimization there. It is the only thing that connects.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"From_a_v0dev_or_Lovable_Prototype_to_a_Deployed_Vercel_App\"><\/span>From a v0.dev or Lovable Prototype to a Deployed Vercel App<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">AI builders like v0.dev and Lovable scaffold a working Next.js app in minutes, then hand you a project that expects a database URL and ships with a generic Postgres or SQLite starter. Swapping that starter for TiDB Cloud Starter takes three steps: prototype, connect, deploy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prototype.<\/strong> Generate the app as usual. The output is a standard Next.js project with an API layer, a data access file, and an <code>.env<\/code> \ub610\ub294 <code>.env.local<\/code> expecting <code>DATABASE_URL<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Connect.<\/strong> Find where the generated app reads that variable. In a Prisma project it is the <code>datasource<\/code> block in <code>prisma\/schema.prisma<\/code>. In a Drizzle or Kysely project it is the client initialization file. Point it at a TiDB Cloud Starter connection string:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DATABASE_URL='mysql:\/\/&lt;user&gt;:&lt;password&gt;@&lt;host&gt;:4000\/&lt;database&gt;?sslaccept=strict'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the scaffold assumed Postgres, change the provider to <code>mysql<\/code> and regenerate the client. TiDB speaks the MySQL wire protocol, so any MySQL driver, ORM, or migration tool works without modification.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deploy.<\/strong> Push to GitHub and import the repo into Vercel, or use the Marketplace integration covered later in this post, which sets the connection variables during deployment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The reason to make the swap at the prototype stage rather than later: the starter database that ships with a generated app is sized for a demo. TiDB Cloud Starter scales horizontally on the same MySQL-compatible interface, so the prototype and the production system run the same code against the same engine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Spin_Up_Your_TiDB_Cloud_Starter_Cluster_Your_Vercel_Database\"><\/span>Spin Up Your TiDB Cloud Starter Cluster (Your Vercel Database)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Provisioning the database takes under a minute. Sign in to <a href=\"https:\/\/tidbcloud.com\/free-trial\">TiDB Cloud<\/a>, follow the on-screen instructions to create a free TiDB Cloud Starter cluster, then click the cluster name to open it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Choose Your Entry Point: Cloud, Starter, or Zero<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Three on-ramps exist, and the right one depends on what you are building.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>TiDB Cloud \uc81c\ub85c<\/strong> provisions an ephemeral instance through a single API call with no sign-up and no billing details. Instances expire after 30 days unless you claim them, and claiming converts one into a persistent TiDB Cloud Starter instance with the data and schema migrated automatically. Zero is built for agent-driven workflows, demos, and CI, and it is currently in public preview at <a href=\"https:\/\/zero.tidbcloud.com\/\">zero.tidbcloud.com<\/a>.<\/li>\n\n\n\n<li><strong>TiDB Cloud \uc2a4\ud0c0\ud130<\/strong> is the free, fully managed serverless tier inside TiDB Cloud. This is the default choice for a Vercel app that needs to persist real data.<\/li>\n\n\n\n<li><strong>TiDB Cloud<\/strong> is the full platform. Starter sits inside it, and Essential and Dedicated add capacity, isolation, and enterprise controls as an app grows.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Start on Zero if an agent or a script is doing the provisioning. Start on Starter if a human is building an app that has to outlive the week.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Grab Your Connection Details<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the cluster view, click <strong>Connect<\/strong> to open the connection details and note the <strong>Host<\/strong>, <strong>Port<\/strong>, \uadf8\ub9ac\uace0 <strong>User<\/strong> values. You will use them to build the connection string the ORM reads.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Store those values as Vercel environment variables rather than committing them to code. In the Vercel dashboard, go to <strong>Settings<\/strong> &gt; <strong>Environment Variables<\/strong>, add <code>DATABASE_URL<\/code>, and scope it to the environments that need it. Locally, keep it in <code>.env.local<\/code>, which Next.js excludes from git by default.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify connectivity before going further:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql --connect-timeout 15 -u '&lt;user&gt;' -h '&lt;host&gt;' -P 4000 -D '&lt;database&gt;' \\\n  --ssl-mode=VERIFY_IDENTITY --ssl-ca=\/etc\/ssl\/certs\/ca-certificates.crt -p<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Model_AI_App_Data_Sessions_Chat_Logs_Preferences_and_Retrieval_State\"><\/span>Model AI App Data: Sessions, Chat Logs, Preferences, and Retrieval State<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An AI app stores a predictable set of things: conversation sessions, the messages inside them, the actions an agent took, and the preferences that shape future responses. Prisma models all of it cleanly, and the mechanics are the same ones any Prisma project uses.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install the adapter, the serverless driver, and the Prisma CLI:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install @tidbcloud\/prisma-adapter @tidbcloud\/serverless\nnpm install prisma --save-dev<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Enable driver adapters in <code>prisma\/schema.prisma<\/code> and define the models:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>generator client {\n  provider        = \"prisma-client-js\"\n  previewFeatures = &#91;\"driverAdapters\"]\n}\n\ndatasource db {\n  provider = \"mysql\"\n  url      = env(\"DATABASE_URL\")\n}\n\nmodel Session {\n  id        String        @id @default(uuid())\n  userId    String        @map(\"user_id\") @db.VarChar(64)\n  title     String?       @db.VarChar(255)\n  createdAt DateTime      @default(now()) @map(\"created_at\")\n  messages  Message&#91;]\n  actions   AgentAction&#91;]\n\n  @@index(&#91;userId, createdAt])\n  @@map(\"sessions\")\n}\n\nmodel Message {\n  id         BigInt   @id @default(autoincrement())\n  sessionId  String   @map(\"session_id\") @db.VarChar(36)\n  role       String   @db.VarChar(16)\n  content    String   @db.Text\n  tokenCount Int?     @map(\"token_count\")\n  createdAt  DateTime @default(now()) @map(\"created_at\")\n  session    Session  @relation(fields: &#91;sessionId], references: &#91;id])\n\n  @@index(&#91;sessionId, createdAt])\n  @@map(\"messages\")\n}\n\nmodel AgentAction {\n  id        BigInt   @id @default(autoincrement())\n  sessionId String   @map(\"session_id\") @db.VarChar(36)\n  tool      String   @db.VarChar(64)\n  input     Json?\n  output    Json?\n  status    String   @db.VarChar(16)\n  createdAt DateTime @default(now()) @map(\"created_at\")\n  session   Session  @relation(fields: &#91;sessionId], references: &#91;id])\n\n  @@index(&#91;sessionId, status])\n  @@map(\"agent_actions\")\n}\n\nmodel UserPreference {\n  userId    String   @id @map(\"user_id\") @db.VarChar(64)\n  settings  Json\n  updatedAt DateTime @updatedAt @map(\"updated_at\")\n\n  @@map(\"user_preferences\")\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Export the connection string and push the schema:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export DATABASE_URL='mysql:\/\/&lt;user&gt;:&lt;password&gt;@&lt;host&gt;:4000\/&lt;database&gt;?sslaccept=strict'\nnpx prisma db push\nnpx prisma generate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Two notes on how the adapter behaves. <code>prisma db push<\/code>, Prisma Migrate, and introspection use the traditional TCP connection, so run them from your machine or CI rather than from an edge function. Prisma Client queries go over HTTPS through the adapter. Initialize the client once per module:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import { PrismaTiDBCloud } from '@tidbcloud\/prisma-adapter';\nimport { PrismaClient } from '@prisma\/client';\n\nconst adapter = new PrismaTiDBCloud({ url: process.env.DATABASE_URL });\nconst prisma = new PrismaClient({ adapter });<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For adapter versions earlier than v6.6.0, build the connection first with <code>connect()<\/code> from <code>@tidbcloud\/serverless<\/code> and pass it to <code>new PrismaTiDBCloud(connection)<\/code>. The <a href=\"https:\/\/www.pingcap.com\/ko\/blog\/integrating-tidb-cloud-serverless-driver-prisma-orm\/\">TiDB Cloud serverless driver and Prisma integration post<\/a> covers the adapter, transactions, and the differences from the TCP path in more depth.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Store_Embeddings_and_Power_Retrieval_With_TiDB_Vector_Search\"><\/span>Store Embeddings and Power Retrieval With TiDB Vector Search<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">TiDB has a native <code>VECTOR<\/code> data type, so embeddings live in the same database as the sessions and messages they belong to. There is no second system to provision, no sync job, and no window where the vector store and the application database disagree.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add a document table with a fixed-dimension vector column and an HNSW index. The dimension has to match your embedding model, and 1536 matches OpenAI\u2019s <code>text-embedding-3-small<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE documents (\n  id BIGINT PRIMARY KEY AUTO_RANDOM,\n  session_id VARCHAR(36),\n  content TEXT,\n  embedding VECTOR(1536),\n  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n  VECTOR INDEX idx_embedding ((VEC_COSINE_DISTANCE(embedding)))\n);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Prisma has no native mapping for <code>VECTOR<\/code>, so create the column with raw SQL and query it through the serverless driver or <code>$queryRaw<\/code>. Retrieval is an ordinary SQL query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import { connect } from '@tidbcloud\/serverless';\n\nconst conn = connect({ url: process.env.DATABASE_URL });\n\nconst results = await conn.execute(\n  `SELECT id, content, VEC_COSINE_DISTANCE(embedding, ?) AS distance\n   FROM documents\n   ORDER BY distance\n   LIMIT 10`,\n  &#91;JSON.stringify(queryEmbedding)]\n);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When you need to filter by tenant, session, or user, run the nearest-neighbor search first and filter the result, because a <code>WHERE<\/code> clause ahead of the vector ordering can stop the index from being used:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM (\n  SELECT id, session_id, content,\n         VEC_COSINE_DISTANCE(embedding, '&#91;0.1, 0.2, ...]') AS distance\n  FROM documents\n  ORDER BY distance\n  LIMIT 50\n) t\nWHERE session_id = '&lt;session-id&gt;'\nORDER BY distance\nLIMIT 10;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The payoff shows up at write time. An insert that stores a message, its embedding, and an agent action commits as one transaction, so retrieval state and application state stay consistent. See the <a href=\"https:\/\/docs.pingcap.com\/tidbcloud\/vector-search-overview\/\">TiDB vector search documentation<\/a> for distance functions, index behavior, and hybrid search with full text.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Connect_From_the_Edge_Vercel_Edge_Functions_and_Cloudflare_Workers\"><\/span>Connect From the Edge: Vercel Edge Functions and Cloudflare Workers<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Edge runtimes are where database choices get tested, because they prohibit raw TCP sockets. Any driver built on a TCP connection fails there regardless of how it is configured. The TiDB Cloud serverless driver connects over HTTPS, and <code>@tidbcloud\/prisma-adapter<\/code> v5.11.0 and later work in Vercel Edge Functions and Cloudflare Workers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A route handler running at the edge looks like an ordinary Prisma query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ app\/api\/messages\/route.ts\nexport const runtime = 'edge';\n\nimport { PrismaTiDBCloud } from '@tidbcloud\/prisma-adapter';\nimport { PrismaClient } from '@prisma\/client';\n\nconst adapter = new PrismaTiDBCloud({ url: process.env.DATABASE_URL });\nconst prisma = new PrismaClient({ adapter });\n\nexport async function GET(request: Request) {\n  const sessionId = new URL(request.url).searchParams.get('session');\n\n  const messages = await prisma.message.findMany({\n    where: { sessionId: sessionId ?? undefined },\n    orderBy: { createdAt: 'asc' },\n    take: 50,\n  });\n\n  return Response.json(messages);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Because each invocation issues its own HTTPS request, a burst of traffic produces a burst of independent requests rather than contention for a shared pool. There is no warm-up penalty on a cold start and no pool to size.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Test locally before deploying:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm run dev<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open <code>http:\/\/localhost:3000\/api\/messages?session=&lt;session-id&gt;<\/code> and confirm you get rows back. If the response is empty but no error appears, the connection is healthy and the table is empty, which is the expected state right after <code>prisma db push<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Deploy_on_Vercel_With_the_TiDB_Cloud_Integration\"><\/span>Deploy on Vercel With the TiDB Cloud Integration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Configuring development, preview, and production environments by hand is slow and error prone, especially when connection details change. The <a href=\"https:\/\/vercel.com\/marketplace\/tidb-cloud\">TiDB Cloud integration on the Vercel Marketplace<\/a> handles it in a few clicks, and the demo app is published as a <a href=\"https:\/\/vercel.com\/templates\/next.js\/tidb-cloud-starter\">TiDB Cloud Starter Template<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the template and click <strong>Deploy<\/strong>. Vercel prompts you to create a GitHub repository. Give it a name, and Vercel creates it if it does not exist.<\/li>\n\n\n\n<li>In the <strong>Add Integrations<\/strong> section, add <strong>TiDB Cloud<\/strong>. In the popup, select the target Vercel project, then the TiDB <strong>Organization<\/strong>, <strong>Project<\/strong>, \uadf8\ub9ac\uace0 <strong>Cluster<\/strong>. The defaults are fine for a first deployment.<\/li>\n\n\n\n<li>Select <strong>Prisma<\/strong> as the framework and click <strong>Add Integration<\/strong>. Vercel returns you to the integration screen with a deployment in progress.<\/li>\n\n\n\n<li>When the deployment finishes, click <strong>Continue to Dashboard<\/strong>, then <strong>Visit<\/strong> to confirm the app is live.<\/li>\n\n\n\n<li>Check <strong>Settings<\/strong> > <strong>Environment Variables<\/strong>. The integration has already written the connection details, so there is nothing to paste by hand.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The last step is worth verifying rather than assuming. Preview deployments and production read the same variables, which is what keeps a branch deploy from pointing at the wrong database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"TiDB_Cloud_Starter_vs_Vercel_Postgres_Neon_and_Supabase\"><\/span>TiDB Cloud Starter vs. Vercel Postgres, Neon, and Supabase<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most Vercel developers choose between Vercel Postgres (now Neon through the Marketplace), Supabase, and TiDB Cloud Starter. All three are managed, all three scale to zero, and all three offer an HTTP driver for edge runtimes. The differences that matter for AI apps show up in scaling model, vector handling, and analytics.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><\/th><th>TiDB Cloud \uc2a4\ud0c0\ud130<\/th><th>Vercel Postgres \/ Neon<\/th><th>Supabase<\/th><\/tr><\/thead><tbody><tr><td>Wire protocol<\/td><td>MySQL<\/td><td>PostgreSQL<\/td><td>PostgreSQL<\/td><\/tr><tr><td>Write scaling<\/td><td>Horizontal across nodes, no manual sharding<\/td><td>Vertical on a single primary, read replicas for reads<\/td><td>Vertical on a single primary, read replicas for reads<\/td><\/tr><tr><td>Edge connectivity<\/td><td>HTTPS serverless driver, Prisma and Kysely adapters<\/td><td>HTTP driver (<code>@neondatabase\/serverless<\/code>)<\/td><td>HTTP via PostgREST, or Supavisor for pooled TCP<\/td><\/tr><tr><td>Vector search<\/td><td>Native <code>VECTOR<\/code> type with HNSW index in the same database<\/td><td>pgvector extension<\/td><td>pgvector extension<\/td><\/tr><tr><td>Analytics on live data<\/td><td>HTAP: row store plus columnar replica in one system<\/td><td>Analytical queries hit the same row store<\/td><td>Analytical queries hit the same row store<\/td><\/tr><tr><td>Beyond the database<\/td><td>Database only<\/td><td>Database only<\/td><td>Auth, storage, realtime, edge functions<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Read the table by what your app needs rather than by row count. More detail on the tiers and limits is on the <a href=\"https:\/\/www.pingcap.com\/ko\/tidb-cloud-starter\/\">TiDB Cloud Starter product page<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Spin_Up_Your_Free_TiDB_Cloud_Starter_Cluster\"><\/span>Spin Up Your Free TiDB Cloud Starter Cluster<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You now have the full path: a prototype wired to a real database, schema for sessions and agent state, embeddings stored beside the rows they describe, edge connectivity over HTTPS, and a one-click deployment that configures itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/tidbcloud.com\/free-trial\">Start a free TiDB Cloud Starter cluster<\/a> and point your Vercel app at it. The full source for the demo app is in the <a href=\"https:\/\/github.com\/pingcap\/tidb-prisma-vercel-demo\">demo repository on GitHub<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>You have an AI app running on Vercel, or a prototype that v0.dev generated in a few minutes, and now it needs a real database. The choice is harder than it looks, because serverless functions and edge runtimes break the assumptions traditional databases are built on: long-lived TCP connections, a bounded pool, and a process [&hellip;]<\/p>\n","protected":false},"author":218,"featured_media":35090,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[436],"tags":[138,147,31,297,526],"class_list":["post-35087","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-ai","tag-distributed-sql","tag-tidb-cloud","tag-vector-search","tag-vercel"],"acf":[],"featured_image_src":"https:\/\/static.pingcap.com\/files\/2026\/09\/25134234\/Copy-of-Blog-Feature-3.png","author_info":{"display_name":"Brian Foster","author_link":"https:\/\/www.pingcap.com\/ko\/blog\/author\/brian-james-foster\/"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Vercel Database for AI Apps: TiDB Cloud Starter<\/title>\n<meta name=\"description\" content=\"Vercel database playbook: run AI apps on TiDB Cloud Starter with edge connections, built-in vector search, and one-click deploy.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/build-with-tidb-cloud-starter-vercel-database\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vercel Database for AI Apps: TiDB Cloud Starter\" \/>\n<meta property=\"og:description\" content=\"Vercel database playbook: run AI apps on TiDB Cloud Starter with edge connections, built-in vector search, and one-click deploy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/blog\/build-with-tidb-cloud-starter-vercel-database\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-24T20:52:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-25T20:54:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2026\/09\/25134234\/Copy-of-Blog-Feature-3.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Brian Foster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brian Foster\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"13\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/\"},\"author\":{\"name\":\"Brian Foster\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/person\\\/e2c94b706bf3eaeebbd9a511005c41f2\"},\"headline\":\"Vercel and TiDB Cloud Starter: The Full-Stack Playbook for AI Apps\",\"datePublished\":\"2026-09-24T20:52:55+00:00\",\"dateModified\":\"2026-09-25T20:54:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/\"},\"wordCount\":2048,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2026\\\/09\\\/25134234\\\/Copy-of-Blog-Feature-3.png\",\"keywords\":[\"AI\",\"Distributed SQL\",\"TiDB Cloud\",\"Vector Search\",\"Vercel\"],\"articleSection\":[\"Tutorial\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/\",\"name\":\"Vercel Database for AI Apps: TiDB Cloud Starter\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2026\\\/09\\\/25134234\\\/Copy-of-Blog-Feature-3.png\",\"datePublished\":\"2026-09-24T20:52:55+00:00\",\"dateModified\":\"2026-09-25T20:54:05+00:00\",\"description\":\"Vercel database playbook: run AI apps on TiDB Cloud Starter with edge connections, built-in vector search, and one-click deploy.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2026\\\/09\\\/25134234\\\/Copy-of-Blog-Feature-3.png\",\"contentUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2026\\\/09\\\/25134234\\\/Copy-of-Blog-Feature-3.png\",\"width\":1800,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/blog\\\/build-with-tidb-cloud-starter-vercel-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pingcap.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vercel and TiDB Cloud Starter: The Full-Stack Playbook for AI Apps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#website\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pingcap.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\\\/\\\/www.pingcap.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2021\\\/11\\\/pingcap-logo.png\",\"contentUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2021\\\/11\\\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/pingcap2015\",\"https:\\\/\\\/x.com\\\/PingCAP\",\"https:\\\/\\\/linkedin.com\\\/company\\\/pingcap\",\"https:\\\/\\\/youtube.com\\\/channel\\\/UCuq4puT32DzHKT5rU1IZpIA\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.pingcap.com\\\/#\\\/schema\\\/person\\\/e2c94b706bf3eaeebbd9a511005c41f2\",\"name\":\"Brian Foster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2023\\\/07\\\/06161300\\\/brian-foster-150x150.jpeg\",\"url\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2023\\\/07\\\/06161300\\\/brian-foster-150x150.jpeg\",\"contentUrl\":\"https:\\\/\\\/static.pingcap.com\\\/files\\\/2023\\\/07\\\/06161300\\\/brian-foster-150x150.jpeg\",\"caption\":\"Brian Foster\"},\"description\":\"Global Content Director\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/brian-foster-33453a6\\\/\"],\"url\":\"https:\\\/\\\/www.pingcap.com\\\/ko\\\/blog\\\/author\\\/brian-james-foster\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vercel Database for AI Apps: TiDB Cloud Starter","description":"Vercel database playbook: run AI apps on TiDB Cloud Starter with edge connections, built-in vector search, and one-click deploy.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/blog\/build-with-tidb-cloud-starter-vercel-database\/","og_locale":"ko_KR","og_type":"article","og_title":"Vercel Database for AI Apps: TiDB Cloud Starter","og_description":"Vercel database playbook: run AI apps on TiDB Cloud Starter with edge connections, built-in vector search, and one-click deploy.","og_url":"https:\/\/www.pingcap.com\/ko\/blog\/build-with-tidb-cloud-starter-vercel-database\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_published_time":"2026-09-24T20:52:55+00:00","article_modified_time":"2026-09-25T20:54:05+00:00","og_image":[{"width":1800,"height":600,"url":"https:\/\/static.pingcap.com\/files\/2026\/09\/25134234\/Copy-of-Blog-Feature-3.png","type":"image\/png"}],"author":"Brian Foster","twitter_card":"summary_large_image","twitter_creator":"@PingCAP","twitter_site":"@PingCAP","twitter_misc":{"\uae00\uc4f4\uc774":"Brian Foster","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"13\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/#article","isPartOf":{"@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/"},"author":{"name":"Brian Foster","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/e2c94b706bf3eaeebbd9a511005c41f2"},"headline":"Vercel and TiDB Cloud Starter: The Full-Stack Playbook for AI Apps","datePublished":"2026-09-24T20:52:55+00:00","dateModified":"2026-09-25T20:54:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/"},"wordCount":2048,"publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2026\/09\/25134234\/Copy-of-Blog-Feature-3.png","keywords":["AI","Distributed SQL","TiDB Cloud","Vector Search","Vercel"],"articleSection":["Tutorial"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/","url":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/","name":"Vercel Database for AI Apps: TiDB Cloud Starter","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/#primaryimage"},"image":{"@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/#primaryimage"},"thumbnailUrl":"https:\/\/static.pingcap.com\/files\/2026\/09\/25134234\/Copy-of-Blog-Feature-3.png","datePublished":"2026-09-24T20:52:55+00:00","dateModified":"2026-09-25T20:54:05+00:00","description":"Vercel database playbook: run AI apps on TiDB Cloud Starter with edge connections, built-in vector search, and one-click deploy.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/#primaryimage","url":"https:\/\/static.pingcap.com\/files\/2026\/09\/25134234\/Copy-of-Blog-Feature-3.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2026\/09\/25134234\/Copy-of-Blog-Feature-3.png","width":1800,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/blog\/build-with-tidb-cloud-starter-vercel-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Vercel and TiDB Cloud Starter: The Full-Stack Playbook for AI Apps"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]},{"@type":"Person","@id":"https:\/\/www.pingcap.com\/#\/schema\/person\/e2c94b706bf3eaeebbd9a511005c41f2","name":"Brian Foster","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/static.pingcap.com\/files\/2023\/07\/06161300\/brian-foster-150x150.jpeg","url":"https:\/\/static.pingcap.com\/files\/2023\/07\/06161300\/brian-foster-150x150.jpeg","contentUrl":"https:\/\/static.pingcap.com\/files\/2023\/07\/06161300\/brian-foster-150x150.jpeg","caption":"Brian Foster"},"description":"Global Content Director","sameAs":["https:\/\/www.linkedin.com\/in\/brian-foster-33453a6\/"],"url":"https:\/\/www.pingcap.com\/ko\/blog\/author\/brian-james-foster\/"}]}},"grav_blocks":false,"card_markup":"<a class=\"card-resource bg-white\" href=\"https:\/\/www.pingcap.com\/ko\/blog\/build-with-tidb-cloud-starter-vercel-database\/\"><div class=\"card-resource__image-container\"><img class=\"card-resource__image\" alt=\"Copy of Blog - Feature\" src=\"https:\/\/static.pingcap.com\/files\/2026\/09\/25134234\/Copy-of-Blog-Feature-3.png\" loading=\"lazy\" width=1800 height=600 \/><\/div><div class=\"card-resource__content-container\"><div class=\"card-resource__content-head\"><div class=\"card-resource__category\">Tutorial<\/div><\/div><h5 class=\"card-resource__title\">Vercel and TiDB Cloud Starter: The Full-Stack Playbook for AI Apps<\/h5><\/div><\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/35087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/218"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/comments?post=35087"}],"version-history":[{"count":11,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/35087\/revisions"}],"predecessor-version":[{"id":35099,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/posts\/35087\/revisions\/35099"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media\/35090"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=35087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/categories?post=35087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/tags?post=35087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}