You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _architecture.mdx
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,13 @@
1
-
---
2
-
title: Scaling
3
-
description: How to scale your SQLite Cloud cluster.
4
-
category: platform
5
-
status: publish
6
-
slug: scaling
7
-
---
8
1
2
+
3
+
## Architecture
4
+
SQLite Cloud uses the [Raft](https://raft.github.io) consensus algorithm to distribute your data changes across a cluster of computing systems, ensuring that each node in the cluster agrees upon the same series of state transitions. Raft implements consensus with a leader approach.
5
+
6
+
SQLite Cloud is written in ANSI C and GO, and it works on most POSIX systems (Linux, *BSD, Mac OS X) and Windows.
7
+
8
+
SQLite Cloud supports all the SQLite features without any limitations, including ACID compliance and non-deterministic SQL statements.
9
+
10
+
## Scaling your cluster
9
11
SQLite Cloud leverages a customized Raft algorithm to maintain a robust and highly available database cluster. Here’s an essential guide on the node types within SQLite Cloud and strategic tips for scaling your cluster effectively.
Copy file name to clipboardExpand all lines: sqlite-cloud/connect-cluster.mdx
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,7 @@ slug: connect-cluster
8
8
9
9
SQLite databases in SQLite Cloud are distributed across a cluster of nodes. Each cluster comes with a multi-region load balancer that routes traffic to the nearest appropriate node.
10
10
11
-
For this reason, we strongly recommend connecting to your cluster via your project connection string. To retrieve your project connection string, navigate to the **Nodes** page and click on any node.
Copy file name to clipboardExpand all lines: sqlite-cloud/create-database.mdx
+34-7Lines changed: 34 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,25 @@ status: publish
6
6
slug: create-database
7
7
---
8
8
9
-
SQLite Cloud allows you to import existing SQLite Databases, or create a new database in SQLite Cloud by importing an existing SQLite database, or using the SQLite Cloud UI, API, or client libraries.
9
+
You can import an existing SQLite databases, or create new databases using the SQLite Cloud UI, API, or client libraries.
10
10
11
-
## Importing an existing SQLite database
12
-
SQLite Cloud allows you to import existing SQLite databases into the platform.
11
+
## Uploading an existing SQLite Database
12
+
### Via HTTP API
13
+
You can upload an existing SQLite database to your cluster using the SQLite Cloud UI or the Weblite API.
13
14
14
-
Note that you can download, modify, and re-upload the database file at any time. You can also upload encrypted SQLite databases if you used the official SEE SQLite encryption extension.
15
+
To upload a local SQLite database via weblite, make a POST request to the `/v2/weblite/<database-name>.sqlite` endpoint.
To upload a local SQLite database via the SQLite Cloud UI, navigate to the Database tab in the left-hand navigation. Click the "Upload Database" button and select your local SQLite database.
26
+
27
+
### Via Dashboard UI
16
28
To import a database from the UI, navigate to the Databases tab and click the "Upload Database" button.
@@ -27,7 +39,7 @@ To create a new database from the SQLite Cloud UI, navigate to the Databases tab
27
39
The default encoding is set to UTF-8, and the default page size is 4096KB.
28
40
29
41
### From the API
30
-
To create a new database or upload an existing database via [Weblite](#), our REST API, you can make a request with the following parameters:
42
+
To create a new database or upload an existing database via [Weblite](/docs/weblite), our REST API, you can make a request with the following parameters:
exportconst introduction ="SQLite Cloud is a distributed relational database system built on top of the SQLite database engine. It has been specifically designed from the ground up to ensure the strong consistency of your data across all nodes in a cluster while simultaneously managing the technical aspects of scaling, security, and data distribution."
8
+
## Overview
9
+
**SQLite Cloud** is a managed, distributed relational database system built on top of the SQLite database engine.
12
10
13
-
exportconst sections = [
14
-
{
15
-
icon: "curvedArrow",
16
-
title: "Introduction",
17
-
description: "SQLite Cloud introduction and getting started guide.",
18
-
href: "/docs/introduction",
19
-
},
20
-
{
21
-
icon: "twoColsGrid",
22
-
title: "Fundamentals",
23
-
description: "Learn how to connect to a cluster and start using SQLite Cloud.",
24
-
href: "/docs/connect-cluster",
25
-
},
26
-
{
27
-
icon: "puzzle",
28
-
title: "Quick start guide",
29
-
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
30
-
href: "/docs/quick-start-cdn",
31
-
}
32
-
]
11
+
It has been designed from the ground up to ensure strong consistency across all nodes in a cluster while simultaneously managing the technical aspects of scaling, security, and data distribution. This ensures that you can focus on your core tasks while relying on SQLite Cloud to handle the complexities of managing your databases.
33
12
13
+
SQLite Cloud is built on the open source SQLite engine, ensuring complete feature parity. You get all of SQLite's core strengths: ACID compliance, support for complex SQL operations, and compatibility with the rich SQLite extension ecosystem.
You can access SQLite Cloud from the most popular programming languages or its REST API.
16
+
17
+
Like SQLite, each database in SQLite Cloud is a separate file, giving you flexible deployment options:
18
+
19
+
* Create separate databases for each customer in a multi-tenant application
20
+
* Share a single database among multiple users with built-in access controls
21
+
* Mix both approaches based on your application's needs
22
+
23
+
### Features
24
+
SQLite Cloud provides a comprehensive suite of tools for building realtime, local-first, edge AI applications.
25
+
***[Webhooks](/docs/webhooks)**: Trigger edge functions or send change payloads via HTTP, Websockets, or on database events like INSERT, UPDATE, and DELETE.
26
+
***[Edge Functions](/docs/edge-functions)**: Run serverless functions on the same nodes that store your data for lightning-fast data access.
27
+
***[Pub/Sub](/docs/pub-sub)**: Subscribe to changes in your database to replicate data, power notifications, and build multiplayer experiences.
28
+
***[Weblite](/docs/weblite)**: Autogenerated REST APIs to interact with the SQLite Cloud platform.
29
+
***[Query Analyzer](/docs/analyzer)**: Receive optimization recommendations for your queries to improve performance.
description: Integrate SQLite Cloud with Knex.js, a popular SQL query builder.
4
+
category: getting-started
5
+
status: publish
6
+
slug: knex-integration
7
+
---
8
+
9
+
In this tutorial, we'll show you how to connect your TypeScript application to a SQLite Cloud database using the popular SQL builder, [Knex.js](https://knexjs.org/).
10
+
11
+
---
12
+
13
+
**Prerequisites**
14
+
15
+
- Node.js and npm installed on your system
16
+
- A SQLite Cloud account (you can sign up for a free account [here](https://sqlitecloud.io/register))
17
+
18
+
1.**How to connect**
19
+
20
+
- Create a Knex.js instance that uses the SQLite Cloud JavaScript driver to connect to your database.
Copy file name to clipboardExpand all lines: sqlite-cloud/platform/backups.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ slug: backups
7
7
---
8
8
9
9
## Overview
10
-
Backups provide a robust solution for mitigating data loss and resolving data corruption issues.
10
+
Backups provide a robust solution for mitigating data loss and resolving data corruption issues. Backups are available for databases in all [Pro and Scale](https://www.sqlitecloud.io/pricing) projects.
11
11
12
12
SQLite Cloud creates a full snapshot backup of your data once a day, and stores incremental changes once per second, on commodity object storage.
0 commit comments