diff --git a/docs/en/images/juicefs-aliyun.png b/docs/en/images/juicefs-aliyun.png index 7d2c340c03aa..3b9b0ea26dbe 100644 Binary files a/docs/en/images/juicefs-aliyun.png and b/docs/en/images/juicefs-aliyun.png differ diff --git a/docs/en/reference/how_to_set_up_metadata_engine.md b/docs/en/reference/how_to_set_up_metadata_engine.md index 575bf0d56b70..f8cb7e56f100 100644 --- a/docs/en/reference/how_to_set_up_metadata_engine.md +++ b/docs/en/reference/how_to_set_up_metadata_engine.md @@ -236,6 +236,10 @@ Additional parameters can be appended to the metadata URL. More details can be s [MySQL](https://www.mysql.com) is one of the most popular open source relational databases, and is often preferred for web applications. +>[MariaDB](https://mariadb.org) is an open source branch of MySQL, maintained by the original developers of MySQL. Because MariaDB is highly compatible with MySQL, there is no difference in set up Meta engine, the parameters and settings are exactly the same. +> +>[OceanBase](https://en.oceanbase.com/) is a self-developed distributed relational database designed for processing massive data and high-concurrency transactions. It features high performance, strong consistency, and high availability. At the same time, OceanBase is highly compatible with MySQL, and there is no difference in the method of setting the metadata engine. + ### Create a file system When using MySQL as the metadata storage engine, you need to create a database manually before create the file system. The command with the following format is usually used to access the database: @@ -316,58 +320,6 @@ juicefs mount -d "mysql://user:mypassword@(192.168.1.6:3306)/juicefs?tls=true" / For more examples of MySQL database address format, please refer to [Go-MySQL-Driver](https://github.com/Go-SQL-Driver/MySQL/#examples). -## MariaDB - -[MariaDB](https://mariadb.org) is an open source branch of MySQL, maintained by the original developers of MySQL. - -Because MariaDB is highly compatible with MySQL, there is no difference in usage, the parameters and settings are exactly the same. - -For example: - -```shell -juicefs format \ - --storage s3 \ - ... \ - "mysql://user:mypassword@(192.168.1.6:3306)/juicefs" \ - pics -``` - -```shell -juicefs mount -d "mysql://user:mypassword@(192.168.1.6:3306)/juicefs" /mnt/jfs -``` - -Passing passwords through environment variables is also the same: - -```shell -export META_PASSWORD="mypassword" -juicefs format \ - --storage s3 \ - ... \ - "mysql://user@(192.168.1.6:3306)/juicefs" \ - pics -``` - -```shell -juicefs mount -d "mysql://user@(192.168.1.6:3306)/juicefs" /mnt/jfs -``` - -To connect to a TLS enabled MariaDB server, pass the `tls=true` parameter (or `tls=skip-verify` if using a self-signed certificate): - -```shell -export META_PASSWORD="mypassword" -juicefs format \ - --storage s3 \ - ... \ - "mysql://user@(192.168.1.6:3306)/juicefs?tls=true" \ - pics -``` - -```shell -juicefs mount -d "mysql://user@(192.168.1.6:3306)/juicefs?tls=true" /mnt/jfs -``` - -For more examples of MariaDB database address format, please refer to [Go-MySQL-Driver](https://github.com/Go-SQL-Driver/MySQL/#examples). - ## SQLite [SQLite](https://sqlite.org) is a widely used small, fast, single-file, reliable and full-featured SQL database engine. diff --git a/docs/en/tutorials/aliyun.md b/docs/en/tutorials/aliyun.md index 5406e39ffe98..9ab75abcf1b3 100644 --- a/docs/en/tutorials/aliyun.md +++ b/docs/en/tutorials/aliyun.md @@ -11,7 +11,7 @@ The metadata is stored completely independently. Retrieval and processing of fil This design can effectively reduce the cost of the object storage in terms of the number of requests. It also allows users to significantly experience the performance improvement brought by JuiceFS. -![JuiceFS-arch-new](../images/juicefs-arch-new.png) +![JuiceFS-arch-new](../images/juicefs-aliyun.png) This document introduces how to use JuiceFS on Alibaba Cloud. @@ -43,9 +43,9 @@ In terms of operating system, JuiceFS can be installed on all operating systems ### Cloud database -JuiceFS stores all the metadata corresponding to the data in a separate database, which currently supports Redis, MySQL, PostgreSQL, and SQLite. +JuiceFS stores all the metadata corresponding to the data in a separate database, which currently supports Redis, MySQL, PostgreSQL, SQLite, and OceanBase. -Depending on the database type, the performance and reliability of metadata are different. For example, Redis runs entirely in memory. While it provides the ultimate performance, it is difficult to operate and maintain and has low reliability. SQLite is a single-file relational database with low performance and is not suitable for large-scale data storage. However, it is configuration-free and suitable for a small amount of data storage on a single machine. +Depending on the database type, the performance and reliability of metadata are different. For example, Redis runs entirely in memory. While it provides the ultimate performance, it is difficult to operate and maintain and has low reliability. SQLite is a single-file relational database with low performance and is not suitable for large-scale data storage. However, it is configuration-free and suitable for a small amount of data storage on a single machine. In contrast, OceanBase is a distributed relational database that delivers high performance while ensuring data consistency and high reliability (RTO < 8 seconds). It is particularly well-suited for scenarios in industries such as finance, retail, and telecommunications, where transactional consistency and distributed capabilities are critical. By integrating with JuiceFS, OceanBase enhances the efficiency, reduces the latency, and improves the stability of handling massive metadata, meeting the demanding requirements of modern distributed storage systems for underlying databases. If you just want to evaluate the functionality of JuiceFS, you can build the database manually on ECS. If you want to use JuiceFS in a production environment, and you don't have a professional database operation and maintenance team, the cloud database service is usually a better choice. @@ -55,12 +55,12 @@ If you must access the database through the public network, you can enhance the On the other hand, if you cannot successfully connect to the cloud database through the public network, you can check the whitelist of the database. -| Database | Redis | MySQL/PostgreSQL | SQLite | -| :-------------: | :-----------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | -| **Performance** | High | Medium | Low | -| **Management** | High | Medium | Low | -| **Reliability** | Low | Medium | Low | -| **Scenario** | Massive data, distributed high-frequency reads and writes | Massive data, distributed low- and medium-frequency reads and writes | Low-frequency reads and writes in single machine for small amounts of data | +| Database | Redis | MySQL/PostgreSQL | SQLite | OceanBase | +| :-------------: | :-----------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | +| **Performance** | High | Medium | Low | High | +| **Management** | High | Medium | Low | Medium | +| **Reliability** | Low | Medium | Low | High | +| **Scenario** | Massive data, distributed high-frequency reads and writes | Massive data, distributed low- and medium-frequency reads and writes | Low-frequency reads and writes in single machine for small amounts of data | Distributed scenarios, strong transaction consistency, and high reliability requirements | **This document uses [ApsaraDB for Redis](https://www.alibabacloud.com/product/apsaradb-for-redis), and the following pseudo address is compiled for demonstration purposes only:** diff --git a/docs/zh_cn/images/juicefs-aliyun.png b/docs/zh_cn/images/juicefs-aliyun.png index 7d2c340c03aa..816edf78f5ac 100644 Binary files a/docs/zh_cn/images/juicefs-aliyun.png and b/docs/zh_cn/images/juicefs-aliyun.png differ diff --git a/docs/zh_cn/reference/how_to_set_up_metadata_engine.md b/docs/zh_cn/reference/how_to_set_up_metadata_engine.md index f611490446f8..0dd670c75662 100644 --- a/docs/zh_cn/reference/how_to_set_up_metadata_engine.md +++ b/docs/zh_cn/reference/how_to_set_up_metadata_engine.md @@ -236,6 +236,10 @@ juicefs format \ [MySQL](https://www.mysql.com) 是受欢迎的开源关系型数据库之一,常被作为 Web 应用程序的首选数据库。 +>[MariaDB](https://mariadb.org) 是 MySQL 的一个开源分支,由 MySQL 原始开发者维护并保持开源,与 MySQL 高度兼容,在设置元数据引擎方法上也没有任何差别。 +> +>[OceanBase](https://www.oceanbase.com/)是一款自主研发的分布式关系型数据库,专为处理海量数据和高并发事务而设计,具备高性能、强一致性和高可用性的特点。同时,OceanBase与 MySQL 高度兼容,在设置元数据引擎方法上也没有任何差别。 + ### 创建文件系统 使用 MySQL 作为元数据存储引擎时,需要提前手动创建数据库,通常使用以下格式访问数据库: @@ -332,58 +336,6 @@ juicefs mount -d "mysql://user:mypassword@(192.168.1.6:3306)/juicefs?tls=true" / 更多 MySQL 数据库的地址格式示例,[点此查看](https://github.com/Go-SQL-Driver/MySQL/#examples)。 -## MariaDB - -[MariaDB](https://mariadb.org) 是 MySQL 的一个开源分支,由 MySQL 原始开发者维护并保持开源。 - -MariaDB 与 MySQL 高度兼容,在使用上也没有任何差别,同样需要提前创建数据库,创建和挂载文件系统时,保持与 MySQL 相同的语法。 - -例如: - -```shell -juicefs format \ - --storage s3 \ - ... \ - "mysql://user:mypassword@(192.168.1.6:3306)/juicefs" \ - pics -``` - -```shell -juicefs mount -d "mysql://user:mypassword@(192.168.1.6:3306)/juicefs" /mnt/jfs -``` - -通过环境变量传递密码的方式也完全一致: - -```shell -export META_PASSWORD="mypassword" -juicefs format \ - --storage s3 \ - ... \ - "mysql://user@(192.168.1.6:3306)/juicefs" \ - pics -``` - -```shell -juicefs mount -d "mysql://user@(192.168.1.6:3306)/juicefs" /mnt/jfs -``` - -要连接到启用 TLS 的 MySQL 服务器,请传递 `tls=true` 参数(或 `tls=skip-verify` 如果使用自签名证书): - -```shell -export META_PASSWORD="mypassword" -juicefs format \ - --storage s3 \ - ... \ - "mysql://user@(192.168.1.6:3306)/juicefs?tls=true" \ - pics -``` - -```shell -juicefs mount -d "mysql://user@(192.168.1.6:3306)/juicefs?tls=true" /mnt/jfs -``` - -更多 MariaDB 数据库的地址格式示例,[点此查看](https://github.com/Go-SQL-Driver/MySQL/#examples)。 - ## SQLite [SQLite](https://sqlite.org) 是全球广泛使用的小巧、快速、单文件、可靠、全功能的单文件 SQL 数据库引擎。 diff --git a/docs/zh_cn/tutorials/aliyun.md b/docs/zh_cn/tutorials/aliyun.md index 6b8595ee67a3..ae5965f37bc9 100644 --- a/docs/zh_cn/tutorials/aliyun.md +++ b/docs/zh_cn/tutorials/aliyun.md @@ -40,9 +40,9 @@ JuiceFS 默认会占用不超过 1GB 的硬盘空间作为缓存,可以根据 ### 二、云数据库 -JuiceFS 会将数据对应的元数据全部存储在独立的数据库中,目前已开放支持的数据库有 Redis、MySQL、PostgreSQL 和 SQLite。 +JuiceFS 会将数据对应的元数据全部存储在独立的数据库中,目前已开放支持的数据库有 Redis、MySQL、PostgreSQL、SQLite,以及 OceanBase。 -根据数据库类型的不同,带来的元数据性能和可靠性表现也各不相同。比如 Redis 是完全运行在内存上的,它能提供极致的性能,但运维难度较高,可靠性相对低。而 MySQL、PostgreSQL 是关系型数据库,性能不如 Redis,但运维难度不高,可靠性也有一定的保障。SQLite 是单机单文件关系型数据库,性能较低,也不适合用于大规模数据存储,但它免配置,适合单机少量数据存储的场景。 +根据数据库类型的不同,带来的元数据性能和可靠性表现也各不相同。比如 Redis 是完全运行在内存上的,它能提供极致的性能,但运维难度较高,可靠性相对低。而 MySQL、PostgreSQL 是关系型数据库,性能不如 Redis,但运维难度不高,可靠性也有一定的保障。SQLite 是单机单文件关系型数据库,性能较低,也不适合用于大规模数据存储,但它免配置,适合单机少量数据存储的场景。相比之下,OceanBase 是一款分布式关系型数据库,能够在提供高性能的同时,确保数据的一致性和高可靠性(RTO < 8s)。它特别适合金融、零售、电信等对事务一致性和分布式能力要求较高的场景,使 JuiceFS 在处理海量元数据时可以实现更高效率、更低延迟和更强稳定性,从而满足现代分布式存储系统对底层数据库的苛刻要求。 如果只是为了评估 JuiceFS 的功能,你可以在 ECS 云服务器手动搭建数据库使用。当你要在生产环境使用 JuiceFS 时,如果没有专业的数据库运维团队,阿里云的云数据库服务通常是更好的选择。 @@ -50,12 +50,12 @@ JuiceFS 会将数据对应的元数据全部存储在独立的数据库中,目 如果必须通过公网访问数据库,可以通过云数据库控台提供的白名单功能,严格限制允许访问数据库的 IP 地址,从而提升数据的安全性。从另一个角度说,如果你通过公网无法成功连接云数据库,那么可以检查数据库的白名单,检查是不是该设置限制了你的访问。 -| 数据库 | Redis | MySQL、PostgreSQL | SQLite | -| :----------: | :----------------------: | :------------------------: | :--------------------: | -| **性能** | 强 | 适中 | 弱 | -| **运维门槛** | 高 | 适中 | 低 | -| **可靠性** | 低 | 适中 | 低 | -| **应用场景** | 海量数据、分布式高频读写 | 海量数据、分布式中低频读写 | 少量数据单机中低频读写 | +| 数据库 | Redis | MySQL、PostgreSQL | SQLite | OceanBase | +| :----------: | :----------------------: | :------------------------: | :--------------------: | :---------------------: | +| **性能** | 强 | 适中 | 弱 | 强 | +| **运维门槛** | 高 | 适中 | 低 | 适中 | +| **可靠性** | 低 | 适中 | 低 | 高 | +| **应用场景** | 海量数据、分布式高频读写 | 海量数据、分布式中低频读写 | 少量数据单机中低频读写 | 分布式场景、强事务一致性、高可靠性要求 | **本文使用了[云数据 Redis 版](https://www.aliyun.com/product/kvstore),以下连接地址只是为了演示目的编制的伪地址:**