# Serverless Tenants Key Space
![`smart`](TiDBCloudKeySpaceNoPD_en_001_20231008.png)
+ Key encoding in TiDB Serverless: `{KeySpacePrefix}_TablePrefix{TableID}_RecordPrefixSeparator{RowID}`
+ Each tenant owns a unique `Key Space`

------------------------------------------------------------------------------
A Key Space is a unique number mapped to a specific tenant, that is used are the key prefix at the TiKV store. Upon data access,  

PD Key Space management interface processes data query requests sent by different tenants from the platform side and allocates TiDB from the on-demand pool according to different tenant Key Spaces.

The cluster will first start a batch of TiDB Servers in the on-demand node pool. The tenant will be assigned a TiDB Server node, when needed. If the assigned TiDB remains idle for more than 5 minutes, the TiDB will be released and returned to the pool.

TiKV data is isolated from different tenant data by different TiKV Key Space prefixes.

Please visit `https://pingcap.com/education/` and study the self-paced eLearning course titled "Introduction to TiDB" for more information on Key-Value store and `MVCC` implementations in TiKV.