# FENVIX documentation > FENVIX is a database service where every customer, agent or test gets its own database. A database is a set of files on object storage that wakes on its first request and sleeps when idle. It speaks the MongoDB protocol. # Introduction Source: /docs/ What FENVIX is, how a database that sleeps works, and where to start. FENVIX is a database service where every customer, agent or test gets its own database. A database is a set of files on object storage. It wakes on its first request and goes back to sleep when nobody needs it, so an idle database costs storage only. ## What you get - **One database per customer, agent or test.** Isolation, restore and deletion work per database, not per shared cluster. - **Nothing running while idle.** A closed database makes no requests. In our benchmark, 1,000,000 idle databases cost about $9 a month in storage. - **Your existing drivers.** FENVIX speaks the MongoDB protocol, so MongoDB drivers and tools connect to it. Note: The benchmark ran against local object storage, with 200 documents per database and S3 Standard storage prices. It is not a latency or a throughput claim. ## Measured results | Fact | Result | | --- | --- | | Differential tests against a reference MongoDB 7.0, with the Python and Node.js drivers | 1,081 of 1,081 pass | | MongoDB calls found in 10 open-source apps that are supported | about 97% | | Acknowledged writes lost across 20 forced kills | 0 | | Requests made by a closed database | 0 | See [Compatibility](/docs/compatibility/) for what is supported. ## How these docs are organized - [Quickstart](/docs/quickstart/): a connection string and examples with the Python and Node.js drivers. - [Concepts](/docs/concepts/): wake, sleep and one owner per database. - [Compatibility](/docs/compatibility/): which MongoDB features and operators are supported. - [Commands](/docs/commands/): per-customer operations. - [FAQ](/docs/faq/). # Quickstart Source: /docs/quickstart/ Get a connection string and run your first queries with the Python and Node.js MongoDB drivers. This page connects an existing driver to a FENVIX database. `` below stands for the host shown on the database's page in the dashboard. ## 1. Get a connection string A connection string uses the MongoDB protocol. Replace the host of your current connection string with the FENVIX endpoint and keep the rest. ```text # before mongodb+srv://:@/acme # after mongodb://:@/acme ``` The database name in the path (`acme` here) selects the database. The first request to a sleeping database wakes it. ## 2. Connect with Python Install the driver, then connect, insert and read back. ```bash pip install pymongo ``` ```python from pymongo import MongoClient client = MongoClient("mongodb://:@/acme") db = client["acme"] db.orders.insert_one({"status": "paid", "total": 42}) print(db.orders.find_one({"status": "paid"})) ``` ## 3. Connect with Node.js ```bash npm install mongodb ``` ```js import { MongoClient } from "mongodb"; const client = new MongoClient("mongodb://:@/acme"); await client.connect(); const db = client.db("acme"); await db.collection("orders").insertOne({ status: "paid", total: 42 }); console.log(await db.collection("orders").findOne({ status: "paid" })); await client.close(); ``` ## 4. Query as before Aggregations work the same way. This example uses `$match` and `$lookup`, both in the supported set listed under [Compatibility](/docs/compatibility/). ```js const paid = await db.collection("orders").aggregate([ { $match: { status: "paid" } }, { $lookup: { from: "users", localField: "userId", foreignField: "_id", as: "user" } }, ]).toArray(); ``` Note: Check [Compatibility](/docs/compatibility/) against your own code before moving a real application. # Concepts Source: /docs/concepts/ Databases that sleep: how a database wakes, sleeps, and why each one has a single owner. ## Databases that sleep An FENVIX database is a set of files on object storage. It is not a process that runs all day. It has two states. | State | Meaning | | --- | --- | | Awake | Filled dot. A server holds the database open and answers requests. | | Asleep | Outlined dot. Only its files exist, in the bucket. It makes no requests and costs storage only. | The state is always shown as a dot and a word, never by color. ## Wake A sleeping database wakes on its first request. The server reads the database's files from the bucket and then answers. The first request after a sleep is therefore slower than the ones after it. If a customer needs every millisecond, keep that database awake (see [Commands](/docs/commands/#keep-awake)). A database that is kept awake never sleeps, so its first request is never slow. ## Sleep When nobody needs a database it goes back to sleep. A closed database makes 0 requests. ## Durability A write is acknowledged only once it is in the bucket. In our tests, 20 forced kills of the server lost no acknowledged write. ## One owner per database A database has one owner at a time: one server holds it open and takes its writes. When the database sleeps, the owner lets go, and the next server that wakes it becomes the owner. ## Protocols The engine is its own database engine on object storage. A protocol is the front door. The front door speaks the MongoDB protocol, which is why MongoDB drivers connect to it. # Compatibility Source: /docs/compatibility/ What FENVIX supports of the MongoDB protocol. This page covers the MongoDB protocol. ## How it was measured - **1,081 of 1,081** differential tests pass against a reference MongoDB 7.0, with the Python and Node.js drivers. - About **97%** of the MongoDB calls found in 10 open-source apps are supported. The apps scanned: Rocket.Chat, Parse Server, NodeBB, Wekan, LibreChat, Novu, Appsmith, Countly, Payload, Open edX. ## Supported - CRUD - `findAndModify` - Array updates - Regex - `$expr` - Aggregation with `$match`, `$group`, `$lookup`, `$unwind`, `$addFields` - Secondary and compound indexes - Hashed and wildcard indexes - TTL indexes - Transactions - Change streams - `$text` and geo queries - `$search` and `$searchMeta` - JavaScript in the database: `$where`, `$function` and `$accumulator` ## Check your code The 97% figure counts calls in the 10 apps above. Check the lists on this page against your own code before you move anything. # Security Source: /docs/security/ How each database stays separate, how connections are protected, and what you control. ## One database, one set of files Every database is its own set of files on object storage. Nothing is shared between two databases, so isolation, restore and erase work on one database without touching another. ## Connections Connections use TLS. You sign in with a user name and password (SCRAM-SHA-256), the way you do with MongoDB. Users and roles belong to a database and are managed with the usual MongoDB commands. ## Data at rest Data is stored encrypted in object storage, in the region you chose when you created the database. The region is fixed for the life of the database. ## Your data, your control You can export a whole database in a format `mongorestore` imports, restore one database to an earlier point in time, and erase one database completely. Erasing deletes every file of the database. See [Commands](/docs/commands/). ## The console You sign in to the console with Google, GitHub or a link sent to your email. Scripts use API keys, which are stored as hashes. # Commands Source: /docs/commands/ Operations built for one database per customer: fork, restore, export, erase, usage and keep awake. Every command works on one database. It never touches any other customer. ## Fork An instant copy of a database, for a test, a branch or an agent. The copy is its own database, with its own state. ## Restore one customer Bring one database back to any point in time without touching any other customer. ## Export and erase Hand over or delete everything a customer has, in one operation. Erase asks you to type the database name to confirm. ## Usage per customer Storage and requests for each database, or grouped by tag, for any month. Export the table as CSV to bill your own customers. ## Keep awake Hold chosen databases open so they answer without a wake, and let the rest sleep. # FAQ Source: /docs/faq/ Short answers about sleeping databases, durability, protocols and cost. ## Is this MongoDB? No. FENVIX is its own database engine on object storage. It speaks the MongoDB protocol, so MongoDB drivers and tools connect to it. ## How fast does a sleeping database answer? It wakes on the first request and reads its files from the bucket, so the first request after a sleep is slower than the ones after it. A database that is kept awake never sleeps and answers every request at the same speed. ## Can I lose data if a server crashes? A write is acknowledged only once it is in the bucket. In our tests, 20 forced kills lost no acknowledged write. ## What does an idle database cost? Storage only. A closed database makes no requests. In our benchmark, 1,000,000 idle databases cost about $9 a month in storage (local object storage, 200 documents per database, S3 Standard storage prices). ## Will my application work? Check [Compatibility](/docs/compatibility/). 1,081 of 1,081 differential tests pass against a reference MongoDB 7.0, and about 97% of the MongoDB calls in 10 open-source apps are supported. Your own code may use something that is not. ## Can I try it? Yes. Sign in to the [console](https://console.fenvix.dev), create a database and copy its connection string.