"OceanBase 4.1 Experience"|Domestic native distributed database supporting Double 11 for many years

Table of contents

foreword

text

1. OceanBase 4.1 release

2. Deploy ocean base

Installation Environment

2.1 Download all-in-one installation package

2.2 Unzip the installation package

2.3 Execute the installation script

2.4 Setting environment variables

2.5 View file location

2.6 Quick start demo environment

2.7 Accessing the database

3. The advantages of oceanbase

4. oceanbase and Oracle compatibility

5. oceanbase and MySQL compatibility

6. Summary


foreword

OceanBase is a domestic native distributed database completely independently developed by Ant Group, which was founded in 2010. It is the only domestic native distributed database in the world that has set new world records in both TPC-C and TPC-H tests.

  • In 2010, founder Yang Zhenkun joined Alibaba, and OceanBase was born in the same year. 
  • In 2019, TPC-C topped the list with 60.88 million tpmC, breaking Oracle's 9-year world record, and "Double 11" created a peak database processing record of 61 million times per second.
  • In 2020, the company was formally established and operated independently commercially. TPC-C broke its own world record of 707 million tpmC, surpassing Oracle by 23 times.
  • In 2021, it will be officially open source, open 3 million lines of core code, TPC-H 15.26 million QphH@30000GB topped the list, becoming the only distributed database in the world to top TPC-C and TPC-H, the number of customers exceeded 400, non-financial Such customers accounted for more than 30% of the revenue, and developed into a truly general-purpose enterprise-level distributed database.
  • In 2022, version 4.0 will be released, the OceanBase public cloud will be officially released, and a new brand Slogan "massive recording pen counts" will be released.

text

1. OceanBase 4.1 release

OceanBase Database (OceanBase Database) is a completely self-developed enterprise-level native distributed database. It achieves financial-level high availability on ordinary hardware. C standard test, a single cluster scale exceeds 1500 nodes, with features such as cloud native, strong consistency, and high compatibility with Oracle/MySQL. 

In 2023, that is, on March 25 this year, the OceanBase Developers Conference·2023 was held in Beijing. The OceanBase 4.1 version officially released at the conference added multiple development-oriented features such as bypass import, tenant-level physical standby database, and MySQL 8.0 compatibility. ability. After testing, the TP performance of 4.1's small-scale environment has a 40% improvement in the comprehensive reading and writing ability of sysnbench compared with 4.0, the performance of TPC-H 100G scenarios has increased by 17% compared with 4.0, and the performance of TPC-DS 100G scenarios has increased by 15% compared with 4.0. 

2. Deploy ocean base

When we have only one available machine and no money, we can choose to download the community version and deploy it on a single machine. The specific installation steps are as follows.

Installation Environment

Virtual machine: VMware Workstation 17 Player

OS: ubuntu-20.04.6-desktop-amd64

2.1 Download all-in-one installation package

Enter the oceanbase software center to download. Since I am using a laptop, I choose the x86 version to download and install.

2.2 Unzip the installation package

tar -xzf oceanbase-all-in-one-4.1.0.0-100120230423105040.el7.x86_64.tar.gz

There will be a new file oceanbase-all-in-one in the same directory as this installation package

2.3 Execute the installation script

cd oceanbase-all-in-one
bin/install.sh

Screenshot of successful installation:

 There is still a bunch of installation information on this, I don't have a screenshot.

2.4 Setting environment variables

# set environment
source ~/. oceanbase-all-in-one/bin/env.sh
# check obd and obclient command

2.5 View file location

which obd
which obclient

2.6 Quick start demo environment

#use obd demo command to quickly launch a demo cluster
obd demo

In fact, the installation is all completed at this step, but because my computer does not have enough storage space, it prompts an error

After the deployment is successful, OBD will print out the connection method of each component, and show you the sign of success:

+---------------------------------------------+
|                   observer                  |
+-----------+---------+------+-------+--------+
| ip        | version | port | zone  | status |
+-----------+---------+------+-------+--------+
| 127.0.0.1 | 4.1.0.0 | 2881 | zone1 | ACTIVE |
+-----------+---------+------+-------+--------+
obclient -h127.0.0.1 -P2881 -uroot -Doceanbase
+---------------------------------------------+
|                   obproxy                   |
+-----------+------+-----------------+--------+
| ip        | port | prometheus_port | status |
+-----------+------+-----------------+--------+
| 127.0.0.1 | 2883 | 2884            | active |
+-----------+------+-----------------+--------+
obclient -h127.0.0.1 -P2883 -uroot -Doceanbase
+----------------------------------------------------+
|                      obagent                       |
+----------------+-------------+------------+--------+
| ip             | server_port | pprof_port | status |
+----------------+-------------+------------+--------+
| 172.30.135.208 | 8088        | 8089       | active |
+----------------+-------------+------------+--------+
+-------------------------------------------------------+
|                       prometheus                      |
+----------------------------+------+----------+--------+
| url                        | user | password | status |
+----------------------------+------+----------+--------+
| http://192.168.1.1:9090    |      |          | active |
+----------------------------+------+----------+--------+
+---------------------------------------------------------------------+
|                               grafana                               |
+----------------------------------------+-------+-----------+--------+
| url                                    | user  | password  | status |
+----------------------------------------+-------+-----------+--------+
| http://192.168.1.1:3000/d/oceanbase    | admin | oceanbase | active |
+----------------------------------------+-------+-----------+--------+

2.7 Accessing the database

Use OBClient client to connect to OceanBase database

  • Directly connect to the database through port 2881

[admin@test001 ~]$ obclient -h127.0.0.1 -P2881 -uroot@sys -Doceanbase -A

Access database through ODP proxy

[admin@test001 ~]$ obclient -h127.0.0.1 -P2883 -uroot@sys -Doceanbase -A --proxy-mode

 The deployment steps refer to the official documentation of oceanbase, and there are other deployment methods, such as: deploying the oceanbase integrated environment and deploying the oceanbase container environment. For details, please refer to: ocean rapid deployment

3. The advantages of oceanbase

  • 1. High reliability: OceanBase adopts a distributed architecture, which can ensure high reliability and availability of data, and supports functions such as disaster recovery backup and automatic fault recovery.
  • 2. High performance: OceanBase adopts a variety of optimization technologies, including distributed computing, data compression, multi-level cache, etc., to support high-concurrency and high-throughput data processing.
  • 3. High scalability: OceanBase supports horizontal expansion, can freely expand the cluster size according to business needs, and supports online expansion and contraction.
  • 4. Global deployment: OceanBase supports global deployment, and can deploy database clusters in different regions according to business needs, providing low-latency, high-availability data services.
  • 5. Multilingual support: OceanBase supports interfaces and APIs in multiple programming languages, making it convenient for developers to develop applications and access data.
  • 6. Security: OceanBase supports multi-layer security mechanisms, including encrypted transmission, access control, auditing, etc., to ensure data security and privacy.

4. oceanbase and Oracle compatibility

OceanBase database is compatible with Oracle database in basic functions such as data types, SQL functions and database objects. In terms of PL, it is basically compatible with all R&D functions. The compatibility of OceanBase database is also very good in advanced features such as database security, backup and recovery, high availability and optimizer, and some features are even better than Oracle database. This means that in the process of migrating from Oracle database to OceanBase database, users do not need to spend a lot of time to learn new knowledge, and can smoothly realize the migration from Oracle database to OceanBase database.

In addition, due to the differences between the OceanBase database and the Oracle database in terms of underlying architecture and product form, some functions of the OceanBase database will not be compatible for the time being or will be different from the Oracle database.

For details, please refer to: Overview of Compatibility with Oracle

5. oceanbase and MySQL compatibility

The MySQL mode of OceanBase database is compatible with most functions and syntax of MySQL 5.7/8.0. Due to different product architectures or low customer needs, some functions are not supported. The following is the difference between the official MySQL mode of the OceanBase database and the native MySQL database: Compatibility with MySQL

6. Summary

The OceanBase database has provided a unified installation package all-in-one package since V4.0.0, and since V4.1.0, the all-in-one package has added support for installing OCP Express. You can choose to install some or all components according to actual needs. The installation of the oceanbase database is quite simple and fast, without setting a high threshold; at the same time, oceanbase also has a corresponding community, where you can query relevant information if you have any questions, and as a domestic database, it is still very friendly to Chinese people.

Guess you like

Origin blog.csdn.net/weixin_53197693/article/details/130337990