diff --git a/docs/content/_index.html b/docs/content/_index.html index 46ac9b0d49f9..69dc40856f76 100644 --- a/docs/content/_index.html +++ b/docs/content/_index.html @@ -54,7 +54,7 @@

USER GUIDES

-
4 chapters
+
5 chapters
Develop
@@ -201,7 +201,7 @@

REFERENCE

-
4 chapters
+
5 chapters
Tools
diff --git a/docs/content/latest/_index.html b/docs/content/latest/_index.html index b7e8e39515a6..20e6d3cf11fb 100644 --- a/docs/content/latest/_index.html +++ b/docs/content/latest/_index.html @@ -37,7 +37,7 @@
-
7 chapters
+
7 articles
Explore
@@ -74,10 +74,10 @@
-
cqlsh CLI
+
cqlsh shell
- Command line interface for interacting with YugabyteDB using YCQL. + CLI shell for interacting with YugabyteDB using YCQL.
@@ -89,7 +89,7 @@
yb-admin
- Command line interface for managing YugabyteDB clusters. + CLI for administering YugabyteDB clusters.
diff --git a/docs/content/latest/admin/cqlsh.md b/docs/content/latest/admin/cqlsh.md index 1fc8c4deb58e..f8e7fa7a3673 100644 --- a/docs/content/latest/admin/cqlsh.md +++ b/docs/content/latest/admin/cqlsh.md @@ -1,7 +1,7 @@ --- title: cqlsh linkTitle: cqlsh -description: cqlsh +description: cqlsh shell for YCQL aliases: - /develop/tools/cqlsh/ - /latest/develop/tools/cqlsh/ @@ -16,7 +16,7 @@ showAsideToc: true ## Overview -The YugabyteDB CQL shell (`cqlsh`) provides a command line interface (CLI) for interacting with YugabyteDB using [YCQL](../../api/ycql/). +The YugabyteDB CQL shell (`cqlsh`) provides a CLI for interacting with YugabyteDB using [YCQL](../../api/ycql/). ## Download @@ -98,7 +98,7 @@ cqlsh> SHOW VERSION ### SHOW HOST -Prints the IP address and port of the YB-TServer service that `cqlsh` is connected to in addition to the cluster name. Example: +Prints the IP address and port of the YB-TServer server that `cqlsh` is connected to in addition to the cluster name. Example: ```sql cqlsh> SHOW HOST diff --git a/docs/content/latest/admin/yb-admin.md b/docs/content/latest/admin/yb-admin.md index ea42cb2ace0b..7c1cdda75b5e 100644 --- a/docs/content/latest/admin/yb-admin.md +++ b/docs/content/latest/admin/yb-admin.md @@ -96,8 +96,8 @@ yb-admin -master_addresses change_master_config [ ADD_SERVER| ``` - master_addresses: Comma-separated list of YB-Master hosts and ports. Default value is `localhost:7100`. -- ADD_SERVER | REMOVE_SERVER: Adds or removes a new YB-Master service. - - After adding or removing a node, verify the status of the YB-Master service on the YB-Master UI page (http://node-ip:7000) or run the [`yb-admin dump_masters_state` command](#dump-masters-state). +- ADD_SERVER | REMOVE_SERVER: Adds or removes a new YB-Master server. + - After adding or removing a node, verify the status of the YB-Master server on the YB-Master UI page (http://node-ip:7000) or run the [`yb-admin dump_masters_state` command](#dump-masters-state). - *ip_addr*: The IP address of the server node. - *port*: The port of the server node. - `0` | `1`: Disabled (`0`) or enabled (`1`). Default is `1`. @@ -156,7 +156,7 @@ yb-admin -master_addresses list_all_tablet_servers #### list_all_masters -Displays a list of all YB-Master services in a table listing the master UUID, RPC host and port, state (`ALIVE` or `DEAD`), and role (`LEADER`, `FOLLOWER`, or `UNKNOWN_ROLE`). +Displays a list of all YB-Master servers in a table listing the master UUID, RPC host and port, state (`ALIVE` or `DEAD`), and role (`LEADER`, `FOLLOWER`, or `UNKNOWN_ROLE`). **Syntax** @@ -195,7 +195,7 @@ yb-admin -master_addresses list_replica_type_counts change_blacklist [ ADD | REMOVE ] ``` - *master-addresses*: Comma-separated list of YB-Master hosts and ports. Default value is `localhost:7100`. -- ADD | REMOVE: Adds or removes the specified YB-TServer services. +- ADD | REMOVE: Adds or removes the specified YB-TServer server. - *ip_addr:port*: The IP address and port of the YB-TServer. **Example** diff --git a/docs/content/latest/admin/yb-ctl.md b/docs/content/latest/admin/yb-ctl.md index 978cf6a11b84..7eee2729f695 100644 --- a/docs/content/latest/admin/yb-ctl.md +++ b/docs/content/latest/admin/yb-ctl.md @@ -156,7 +156,7 @@ and [Wipe and restart with placement info flags](#wipe-and-restart-with-placemen Specifies the number of replicas for each tablet. Should be an odd number of least `3` or (for example, `3` or `5`) so that a majority consensus can be established. -Replication factor for the cluster as well as default number of YB-Master services. +Replication factor for the cluster as well as default number of YB-Master servers. Default: `1` @@ -194,7 +194,7 @@ To quickly create a local YugabyteDB cluster for development and learning, use t In order to ensure that all of the replicas for a given tablet can be placed on different nodes, the number of nodes created with the initial create command is always equal to the replication factor. To expand or shrink the cluster, use the [`add_node`](#add-nodes) and [`remove_node`](#stop-remove-nodes) commands. -Each of these initial nodes run a `yb-tserver` service and a `yb-master` service. Note that the number of YB-Master services in a cluster must equal the replication factor for the cluster to be considered operating normally. +Each of these initial nodes run a `yb-tserver` server and a `yb-master` server. Note that the number of YB-Master servers in a cluster must equal the replication factor for the cluster to be considered operating normally. ### Create a local 1-node cluster with replication factor of 1 @@ -319,7 +319,7 @@ $ ./bin/yb-ctl setup_redis ### Add nodes -- Adding a new node to the cluster. This will start a new YB-TServer service and give it a new `node_id` for tracking purposes. +- Adding a new node to the cluster. This will start a new YB-TServer server and give it a new `node_id` for tracking purposes. ```sh $ ./bin/yb-ctl add_node @@ -370,7 +370,7 @@ $ ./bin/yb-ctl add_node --placement_info "cloud1.region1.zone1" ### Create a cluster with custom flags -You can also pass custom flags to the YB-Master and YB-TServer services. +You can also pass custom flags to the YB-Master and YB-TServer servers. ```sh $ ./bin/yb-ctl --rf 1 create --master_flags "log_cache_size_limit_mb=128,log_min_seconds_to_retain=20,master_backup_svc_queue_length=70" --tserver_flags "log_inject_latency=false,log_segment_size_mb=128,raft_heartbeat_interval_ms=1000" diff --git a/docs/content/latest/admin/yb-docker-ctl.md b/docs/content/latest/admin/yb-docker-ctl.md index c177fb361762..24e4937edabf 100644 --- a/docs/content/latest/admin/yb-docker-ctl.md +++ b/docs/content/latest/admin/yb-docker-ctl.md @@ -13,7 +13,7 @@ isTocNested: true showAsideToc: true --- -The YugabyteDB `yb-docker-ctl` utility provides a simple command line interface (CLI), or shell, for administering a local Docker-based cluster for development and learning. It manages the [YB-Master](../yb-master/) and [YB-TServer](../yb-tserver/) containers to perform the necessary administration. +The `yb-docker-ctl` utility provides a simple command line interface (CLI), or shell, for administering a local Docker-based cluster for development and learning. It manages the [YB-Master](../yb-master/) and [YB-TServer](../yb-tserver/) containers to perform the necessary administration. ## Download diff --git a/docs/content/latest/admin/ysql-dump.md b/docs/content/latest/admin/ysql-dump.md index b7416ecbb1c5..4cd29182af0c 100644 --- a/docs/content/latest/admin/ysql-dump.md +++ b/docs/content/latest/admin/ysql-dump.md @@ -220,7 +220,7 @@ The data section contains actual table data, large-object contents, and sequence Use a `serializable` transaction for the dump to ensure that the snapshot used is consistent with later database states by waiting for a point in the transaction stream at which no anomalies can be present, so that there is no risk of the dump failing or causing other transactions to roll back with a `serialization_failure`. -If there are active read-write transactions, the maximum wait time until the start of the dump will be `50ms` (based on the default [`--max_clock_skew_usec`](../../reference/configuration/yb-tserver/#max-clock-skew-usec) for YB-TServer and YB-Master services.) If there are no active read-write transactions when `ysql_dump` is started, this option will not make any difference. Once running, performance with or without the option is the same. +If there are active read-write transactions, the maximum wait time until the start of the dump will be `50ms` (based on the default [`--max_clock_skew_usec`](../../reference/configuration/yb-tserver/#max-clock-skew-usec) for YB-TServer and YB-Master servers.) If there are no active read-write transactions when `ysql_dump` is started, this option will not make any difference. Once running, performance with or without the option is the same. #### --snapshot=*snapshotname* diff --git a/docs/content/latest/admin/ysqlsh.md b/docs/content/latest/admin/ysqlsh.md index 1cc569450cda..7024a051e834 100644 --- a/docs/content/latest/admin/ysqlsh.md +++ b/docs/content/latest/admin/ysqlsh.md @@ -1,7 +1,7 @@ --- title: ysqlsh linkTitle: ysqlsh -description: ysqlsh +description: ysqlsh shell for YSQL aliases: - /develop/tools/ysqlsh/ - /latest/develop/tools/ysqlsh/ @@ -14,7 +14,7 @@ isTocNested: 5 showAsideToc: true --- -Use the `ysqlsh` command line interface (CLI) to connect to YugabyteDB and use [Yugabyte Structured Query Language (YSQL)](../../api/ysql/), the distributed SQL API for YugabyteDB that is compatible with the SQL dialect of PostgreSQL. `ysqlsh` provides a YSQL shell to enable you to: +The YugabyteDB SQL shell (`ysqlsh`) provides a CLI for interacting with YugabyteDB using [YSQL](../../api/ysql/). It enables you to: - interactively enter SQL queries and see the query results - input from a file or the command line diff --git a/docs/content/latest/architecture/2dc-deployments.md b/docs/content/latest/architecture/2dc-deployments.md index c196602d2675..29cc63eebd20 100644 --- a/docs/content/latest/architecture/2dc-deployments.md +++ b/docs/content/latest/architecture/2dc-deployments.md @@ -15,7 +15,7 @@ showAsideToc: true YugabyteDB provides synchronous replication of data in clusters dispersed across multiple (three or more) data centers by leveraging the Raft consensus algorithm to achieve enhanced high availability and performance. However, many use cases and smaller enterprise applications do not require synchronous replication or justify the additional complexity and operation costs associated with managing three or more data centers. For these needs, YugabyteDB also supports two data center (2DC) deployments, which use asynchronous replication built on top of [change data capture (CDC)](../../architecture/cdc-architecture) in DocDB. -For details about configuring a 2DC deployment, see [Replicate between two data centers](../../deploy/replicate-2dc). +For details about configuring a 2DC deployment, see [Replicate between two data centers](../../deploy/multi-dc/2dc-deployment). {{< note title="Note" >}} diff --git a/docs/content/latest/architecture/cdc-architecture.md b/docs/content/latest/architecture/cdc-architecture.md index fefc40e50e45..aed3529bddd3 100644 --- a/docs/content/latest/architecture/cdc-architecture.md +++ b/docs/content/latest/architecture/cdc-architecture.md @@ -34,7 +34,7 @@ Maintaining multiple data centers enables enterprises to provide: - High availability (HA) — Redundant systems help ensure that your operations virtually never fail. - Geo-redundancy — Geographically dispersed servers provide resiliency against catastrophic events and natural disasters. -Two data center (2DC), or dual data center, deployments are a common use of CDC that allows efficient management of two YugabyteDB universes that are geographically separated. For more information, see [Two data center (2DC) deployments](../2dc-deployments) and [Replicate between two data centers](../../deploy/replicate-2dc) +Two data center (2DC), or dual data center, deployments are a common use of CDC that allows efficient management of two YugabyteDB universes that are geographically separated. For more information, see [Two data center (2DC) deployments](../2dc-deployments) and [Replicate between two data centers](../../deploy/2dc-deployment) ### Compliance and auditing diff --git a/docs/content/latest/architecture/concepts/yb-tserver.md b/docs/content/latest/architecture/concepts/yb-tserver.md index 5b5c94aa71d9..b957f48b83e9 100644 --- a/docs/content/latest/architecture/concepts/yb-tserver.md +++ b/docs/content/latest/architecture/concepts/yb-tserver.md @@ -14,9 +14,7 @@ showAsideToc: true --- The YB-TServer (short for YugabyteDB Tablet Server) is the service that does the actual IO for end -user requests. Recall from the previous section that data for a table is split, or sharded, into tablets. -Each tablet is composed of one or more tablet-peers, depending on the replication factor. And each -YB-TServer hosts one or more tablet-peers. +user requests in a YugabyteDB cluster. Recall from the previous section that data for a table is split, or sharded, into tablets.Each tablet is composed of one or more tablet-peers, depending on the replication factor. And each YB-TServer hosts one or more tablet-peers. Note: We will refer to the “tablet-peers hosted by a YB-TServer” simply as the “tablets hosted by a YB-TServer”. diff --git a/docs/content/latest/architecture/docdb/_index.html b/docs/content/latest/architecture/docdb/_index.html index 85992b9131e0..984ce870a26d 100644 --- a/docs/content/latest/architecture/docdb/_index.html +++ b/docs/content/latest/architecture/docdb/_index.html @@ -6,7 +6,7 @@ aliases: - /architecture/concepts/docdb/ - /latest/architecture/concepts/docdb/ -headcontent: YugabyteDB's distributed document store responsible for sharding, replication, transactions and persistence. +headcontent: YugabyteDB's distributed document store responsible for sharding, replication, transactions and persistence. menu: latest: identifier: docdb @@ -14,6 +14,12 @@ weight: 1140 --- +{{< note title="Note" >}} + +YugabyteDB's sharding and replication architecture is inspired by Google Spanner. + +{{}} +
diff --git a/docs/content/latest/architecture/transactions/_index.html b/docs/content/latest/architecture/transactions/_index.html index 341cef6557ad..6084d5127fc1 100644 --- a/docs/content/latest/architecture/transactions/_index.html +++ b/docs/content/latest/architecture/transactions/_index.html @@ -15,7 +15,7 @@ {{< note title="Note" >}} -YugabyteDB's ACID transaction models were inspired by Google Spanner. +YugabyteDB's distributed ACID transaction architecture is inspired by Google Spanner. {{}} diff --git a/docs/content/latest/deploy/_index.html b/docs/content/latest/deploy/_index.html index fa146800b67e..73f64e01a79d 100644 --- a/docs/content/latest/deploy/_index.html +++ b/docs/content/latest/deploy/_index.html @@ -66,25 +66,26 @@
- + diff --git a/docs/content/latest/deploy/cdc/_index.html b/docs/content/latest/deploy/cdc/_index.html index 53a8deffc31e..0882fbf3e55a 100644 --- a/docs/content/latest/deploy/cdc/_index.html +++ b/docs/content/latest/deploy/cdc/_index.html @@ -2,7 +2,7 @@ title: Change data capture (CDC) linkTitle: Change data capture (CDC) description: Change data capture (CDC) -headcontent: Deploy YugabyteDB applications that use change data capture (CDC) to asynchronously replicate data changes between Yugabyte clusters and Apache Kafka or stdout. +headcontent: Asynchronously replicate data changes between YugabyteDB and Apache Kafka or stdout. image: /images/section_icons/sample-data/s_s1-sampledata-3x.png beta: /faq/product/#what-is-the-definition-of-the-beta-feature-tag aliases: @@ -16,10 +16,22 @@
+ +
- +
CDC to Apache Kafka
@@ -31,7 +43,7 @@
- +
CDC to stdout
diff --git a/docs/content/latest/deploy/cdc/cdc-to-kafka.md b/docs/content/latest/deploy/cdc/cdc-to-kafka.md index 0efb8bd63ac4..c34f428205bb 100644 --- a/docs/content/latest/deploy/cdc/cdc-to-kafka.md +++ b/docs/content/latest/deploy/cdc/cdc-to-kafka.md @@ -37,7 +37,7 @@ A local install of the Confluent Platform should be up and running. The [Conflue To get a local Confluent Platform (with Apache Kafka) up and running quickly, follow the steps in the [Confluent Platform Quick Start (Local)](https://docs.confluent.io/current/quickstart/ce-quickstart.html#ce-quickstart). -## Step 1 — Add the "users" table +## 1. Add the "users" table With your local YugabyteDB cluster running, create a table, called `users`, in the default database (`yugabyte`). @@ -45,7 +45,7 @@ With your local YugabyteDB cluster running, create a table, called `users`, in t CREATE TABLE users (name text, pass text, id int, primary key (id)); ``` -## Step 2 — Create Avro schemas +## 2. Create Avro schemas The Kafka Connect YugabyteDB Source Connector supports the use of [Apache Avro schemas](http://avro.apache.org/docs/current/#schemas) to serialize and deserialize tables. You can use the [Schema Registry](https://docs.confluent.io/current/schema-registry/index.html) in the Confluent Platform to create and manage Avro schema files. For a step-by-step tutorial, see [Schema Registry Tutorial](https://docs.confluent.io/current/schema-registry/schema_registry_tutorial.html). @@ -81,7 +81,7 @@ You can use the following two Avro schema examples that will work with the `user } ``` -## Step 3 — Start the Apache Kafka services +## 3. Start the Apache Kafka services 1. Create a Kafka topic. @@ -95,7 +95,7 @@ You can use the following two Avro schema examples that will work with the `user bin/kafka-avro-console-consumer --bootstrap-server localhost:9092 --topic users_topic --key-deserializer=io.confluent.kafka.serializers.KafkaAvroDeserializer --value-deserializer=io.confluent.kafka.serializers.KafkaAvroDeserializer ``` -## Step 4 — Download the Kafka Connect YugabyteDB Source Connector +## 4. Download the Kafka Connect YugabyteDB Source Connector Download the Kafka Connect YugabyteDB Source Connector JAR file (`yb-cdc-connector.jar`). @@ -104,7 +104,7 @@ $ wget -O yb-cdc-connector.jar https://github.com/yugabyte/yb-kafka-connector/bl ``` -## Step 5 — Log to Kafka +## 5. Log to Kafka Run the following command to start logging an output stream of data changes from the YugabyteDB `cdc` table to Apache Kafka. @@ -119,11 +119,11 @@ java -jar yb-cdc-connector.jar The example above uses the following parameters: - `--table_name` — Specifies the namespace and table, where namespace is the database (YSQL) or keyspace (YCQL). -- `--master_addrs` — Specifies the IP addresses for all of the YB-Master services that are producing or consuming. Default value is `127.0.0.1:7100`. If you are using a 3-node local cluster, then you need to specify a comma-delimited list of the addresses for all of your YB-Master services. +- `--master_addrs` — Specifies the IP addresses for all of the YB-Master servers that are producing or consuming. Default value is `127.0.0.1:7100`. If you are using a 3-node local cluster, then you need to specify a comma-delimited list of the addresses for all of your YB-Master servers. - `topic_name` — Specifies the Apache Kafka topic name. - `table_schema_path` — Specifies the location of the Avro file (`.avsc`) for the table schema. - `primary_key_schema_path` — Specifies the location of the Avro file (`.avsc`) for the primary key schema. -## Step 6 — Write values and observe +## 6. Write values and observe In another window, write values to the table and observe the values on your Kafka output stream. diff --git a/docs/content/latest/deploy/cdc/cdc-to-stdout.md b/docs/content/latest/deploy/cdc/cdc-to-stdout.md index fbe0956ea227..23c849a757cd 100644 --- a/docs/content/latest/deploy/cdc/cdc-to-stdout.md +++ b/docs/content/latest/deploy/cdc/cdc-to-stdout.md @@ -25,7 +25,7 @@ A 1-node YugabyteDB cluster with an RF of 1 is up and running locally (the `yb-c A JRE (or JDK), for Java 8 or later, is installed. JDK and JRE installers for Linux, macOS, and Windows can be downloaded from [OpenJDK](http://jdk.java.net/), [AdoptOpenJDK](https://adoptopenjdk.net/), or [Azul Systems](https://www.azul.com/downloads/zulu-community/). -## Step 1 — Add a database table +## 1. Add a database table Start your local YugabyteDB cluster and add a table, named `users`, to the default `yugabyte` database. @@ -33,22 +33,16 @@ Start your local YugabyteDB cluster and add a table, named `users`, to the defau CREATE TABLE users (name text, pass text, id int, PRIMARY KEY (id)); ``` -## Step 2 — Download the Kafka Connect YugabyteDB Source Connector +## 2. Download the YugabyteDB CDC Connector -Download the Kafka Connect YugabyteDB Source Connector JAR file (`yb-cdc-connector.jar`). +Download the CDC Connector JAR file (`yb-cdc-connector.jar`). ```sh $ wget -O yb-cdc-connector.jar https://github.com/yugabyte/yb-kafka-connector/blob/master/yb-cdc/yb-cdc-connector.jar?raw=true ``` -{{< note title="Note" >}} - -The Kafka Connect YugabyteDB Source Connector also supports change data capture (CDC) to `stdout`. - -{{< /note >}} - -## Step 3 — Stream the log output stream to "stdout" +## 3. Stream the log output stream to "stdout" Run the command below to to start logging an output stream of data changes from the YugabyteDB `cdc` table to `stdout`. @@ -61,9 +55,9 @@ java -jar yb-cdc-connector.jar The example above uses the following parameters: - `--table_name` — Specifies the namespace and table, where namespace is the database (YSQL) or keyspace (YCQL). -- `--master_addrs` — Specifies the IP addresses for all of the YB-Master services that are producing or consuming. Default value is `127.0.0.1:7100`. If you are using a 3-node local cluster, then you need to specify a comma-delimited list of the addresses for all of your YB-Master services. +- `--master_addrs` — Specifies the IP addresses for all of the YB-Master servers that are producing or consuming. Default value is `127.0.0.1:7100`. If you are using a 3-node local cluster, then you need to specify a comma-delimited list of the addresses for all of your YB-Master servers. - `--log_only`: Flag to restrict logging only to the console (`stdout`). -## Step 4 — Write values and observe +## 4. Write values and observe In another terminal shell, write some values to the table and observe the values on your `stdout` output stream. diff --git a/docs/content/latest/deploy/cdc/use-cdc.md b/docs/content/latest/deploy/cdc/use-cdc.md index c2b07e32d2fe..2b1111f3a8b1 100644 --- a/docs/content/latest/deploy/cdc/use-cdc.md +++ b/docs/content/latest/deploy/cdc/use-cdc.md @@ -1,7 +1,7 @@ --- -title: Using the Yugabyte CDC connector -linkTitle: Using the Yugabyte CDC connector -description: Using the Yugabyte CDC connector +title: Using the YugabyteDB CDC connector +linkTitle: Using the YugabyteDB CDC connector +description: Using the YugabyteDB CDC connector beta: /faq/product/#what-is-the-definition-of-the-beta-feature-tag menu: latest: @@ -13,11 +13,11 @@ isTocNested: true showAsideToc: true --- -Use change data capture (CDC) in your YugabyteDB deployments to asynchronously replicate data changes. In the sections below, learn how you can use the Yugabyte CDC connector to send data changes to Apache Kafka or to `stdout`. +Use change data capture (CDC) in your YugabyteDB deployments to asynchronously replicate data changes. In the sections below, learn how you can use the YugabyteDB CDC connector to send data changes to Apache Kafka or to `stdout`. {{< note title="Note" >}} -The information on this page is for testing and learning about using CDC with the Yugabyte CDC connector on a local YugabyteDB cluster. Details about requirements for production deployments will be added shortly. +The information on this page is for testing and learning about using CDC with the YugabyteDB CDC connector on a local YugabyteDB cluster. Details about requirements for production deployments will be added shortly. {{< /note >}} @@ -49,9 +49,9 @@ The Confluent Platform currently only supports Java 8 and 11. If you do not use {{< /note >}} -## Install the Yugabyte CDC connector +## Install the YugabyteDB CDC connector -1. Download the [Yugabyte CDC connector (`yb-cdc-connector.jar`)](https://github.com/yugabyte/yb-kafka-connector/blob/master/yb-cdc/yb-cdc-connector.jar). +1. Download the [YugabyteDB CDC connector (`yb-cdc-connector.jar`)](https://github.com/yugabyte/yb-kafka-connector/blob/master/yb-cdc/yb-cdc-connector.jar). 2. Install the JAR file in the following recommended location: @@ -59,9 +59,9 @@ The Confluent Platform currently only supports Java 8 and 11. If you do not use - macOS: `\Library\Java\Extensions\yb-cdc-connector.jar` - Windows: `%SystemRoot%\Sun\Java\lib\ext\yb-cdc-connector.jar` -## Use the Yugabyte CDC connector +## Use the YugabyteDB CDC connector -To use the Yugabyte CDC connector, run the `yb_cdc_connector` JAR file. +To use the YugabyteDB CDC connector, run the `yb_cdc_connector` JAR file. ### Syntax for Apache Kafka @@ -97,9 +97,9 @@ Specify the namespace and table, where namespace is the database (YSQL) or keysp #### `--master_addrs` -Specify the IP addresses for all of the YB-Master services that are producing or consuming. Default value is `127.0.0.1:7100`. +Specify the IP addresses for all of the YB-Master servers that are producing or consuming. Default value is `127.0.0.1:7100`. -If you are using a 3-node local cluster, then you need to specify a comma-delimited list of the addresses for all of your YB-Master services. +If you are using a 3-node local cluster, then you need to specify a comma-delimited list of the addresses for all of your YB-Master servers. #### `--log_only` (stdout only) @@ -111,7 +111,7 @@ Specify the Apache Kafka topic name. #### `schema_registry_addrs` (Apache Kafka only) -### `table_schema_path` (Apache Kafka only) +#### `table_schema_path` (Apache Kafka only) Specify the location of the Avro file (`.avsc`) for the table schema. @@ -133,7 +133,7 @@ To get the stream ID, run the YugabyteDB CDC connector and the first time you ca ### Sending a CDC output stream to "stdout" -The following command will start the Yugabyte CDC connector and send an output stream from a 3-node YugabyteDB cluster to `stdout`. +The following command will start the YugabyteDB CDC connector and send an output stream from a 3-node YugabyteDB cluster to `stdout`. ```sh java -jar yb_cdc_connector.jar @@ -144,7 +144,7 @@ java -jar yb_cdc_connector.jar ### Sending a CDC output stream to a Kafka topic -The following command will start the Yugabyte CDC connector and send an output stream from a 3-node YugabyteDB cluster to a Kafka topic. +The following command will start the YugabyteDB CDC connector and send an output stream from a 3-node YugabyteDB cluster to a Kafka topic. ```sh java -jar target/yb_cdc_connector.jar diff --git a/docs/content/latest/deploy/checklist.md b/docs/content/latest/deploy/checklist.md index 3572010fa314..04d853798d76 100644 --- a/docs/content/latest/deploy/checklist.md +++ b/docs/content/latest/deploy/checklist.md @@ -15,17 +15,17 @@ showAsideToc: true ## Overview -YugabyteDB consists of two distributed services - the YB-Master service and the YB-TServer service. The YB-Master service should be brought up first followed by the YB-TServer service. In order to bring up these distributed services, the respective processes (YB-Master or YB-TServer) need to be started across different machines. Below are some considerations and recommendations on starting these services. The *deployment configurations* section below has detailed steps on how to setup YugabyteDB clusters. +A YugabyteDB cluster consists of two distributed services - the YB-TServer service and the YB-Master service. The YB-Master service should be brought up first followed by the YB-TServer service. In order to bring up these distributed services, the respective servers (YB-Master or YB-TServer) need to be started across different nodes. Below are some considerations and recommendations on starting these services. The *deployment configurations* section below has detailed steps on how to setup YugabyteDB clusters. ## Basics - YugabyteDB works on a variety of operating systems. For production workloads, the recommended operating systems are CentOS 7.x and RHEL 7.x. -- Set the appropriate [system limits using `ulimit`](../manual-deployment/system-config/#setting-ulimits) on each node running a YugabyteDB process. +- Set the appropriate [system limits using `ulimit`](../manual-deployment/system-config/#setting-ulimits) on each node running a YugabyteDB server. - Use [ntp](../manual-deployment/system-config/#ntp) to synchronize time among the machines. ## Replication -YugabyteDB internally replicates data in order to survive node failure without compromising data correctness. The number of copies of the data represents the replication factor. +YugabyteDB internally replicates data in a strongly consistent manner using Raft consensus protocol in order to survive node failure without compromising data correctness. The number of copies of the data represents the replication factor. You would first need to choose a replication factor. You would need at least as many machines as the replication factor. YugabyteDB works with both hostnames or IP addresses. IP addresses are preferred at this point, they are more extensively tested. Below are some recommendations relating to the replication factor. @@ -34,9 +34,9 @@ You would first need to choose a replication factor. You would need at least as - A replication factor of `3` allows tolerating one machine failure. - A replication factor of `5` allows tolerating two machine failures. - More generally, if the replication factor is `n`, YugabyteDB can survive `(n - 1) / 2` failures without compromising correctness or availability of data. -- Number of YB-Master processes running in a cluster should match replication factor. Run each process on a separate machine to prevent losing data on failures. -- Number of YB-TServer processes running in the cluster should not be less than the replication factor. Run each process on a separate machine to prevent losing data on failures. -- Specify the replication factor using the `--replication_factor` when bringing up the YB-Master processes. +- Number of YB-Master servers running in a cluster should match replication factor. Run each server on a separate machine to prevent losing data on failures. +- Number of YB-TServer servers running in the cluster should not be less than the replication factor. Run each server on a separate machine to prevent losing data on failures. +- Specify the replication factor using the `--replication_factor` when bringing up the YB-Master servers. See the [yb-master command reference](../manual-deployment/start-masters) for more information. @@ -59,7 +59,7 @@ Allocate adequate CPU and RAM. YugabyteDB has good defaults for running on a wid - Both local or remote attached storage work with YugabyteDB. Since YugabyteDB internally replicates data for fault tolerance, remote attached storage which which does its own additional replication is not a requirement. Local disks often offer better performance at a lower cost. - Multi-disk nodes - Do not use RAID across multiple disks. YugabyteDB can natively handle multi-disk nodes (JBOD). - - Create a data directory on each of the data disks and specify a comma separated list of those directories to the yb-master and yb-tserver processes via the `--fs_data_dirs` flag. + - Create a data directory on each of the data disks and specify a comma separated list of those directories to the yb-master and yb-tserver servers via the `--fs_data_dirs` flag. - Mount settings - XFS is the recommended filesystem. - Use the `noatime` setting when mounting the data drives. @@ -72,7 +72,7 @@ Below is a minimal list of default ports (along with the network access required - 7100 (YB-Master RPC communication port) - 9100 (YB-TServer RPC communication port) - In order to view the cluster dashboard, you need to be able to navigate to the following ports on the nodes - - 7000 (Cluster dashboard viewable from any of the YB-Master processes) + - 7000 (Cluster dashboard viewable from any of the YB-Master servers) - To use the database from the app, the following ports need to be accessible from the app (or commandline interface) - 9042 (which supports YCQL, YugabyteDB's Cassandra-compatible API) - 6379 (which supports YEDIS, YugabyteDB's Redis-compatible API) @@ -108,7 +108,7 @@ For YugabyteDB to preserve data consistency, the clock drift and clock skew acro ### Clock skew -Set a safe value for the maximum clock skew parameter (`--max_clock_skew_usec`) when starting the YugabyteDB processes. We recommend setting this parameter to twice the expected maximum clock skew between any two nodes in your deployment. +Set a safe value for the maximum clock skew parameter (`--max_clock_skew_usec`) when starting the YugabyteDB servers. We recommend setting this parameter to twice the expected maximum clock skew between any two nodes in your deployment. For example, if the maximum clock skew across nodes is expected to be no more than 250ms, then set the parameter to 500ms (`--max_clock_skew_usec=500000`). diff --git a/docs/content/latest/deploy/kubernetes/yugabyte-operator.md b/docs/content/latest/deploy/kubernetes/yugabyte-operator.md index 24354c362ab3..ac92ba139d94 100644 --- a/docs/content/latest/deploy/kubernetes/yugabyte-operator.md +++ b/docs/content/latest/deploy/kubernetes/yugabyte-operator.md @@ -78,7 +78,7 @@ Enable TLS encryption for YugabyteDB, if desired. It is disabled by default. You ### YB-Master and YB-TServer -YB-Master and YB-TServer are two essential components of a YugabyteDB cluster. YB-Master is responsible for recording and maintaining system metadata & for admin activities. YB-TServer services are mainly responsible for data I/O. +YB-Master and YB-TServer are two essential components of a YugabyteDB cluster. YB-Master is responsible for recording and maintaining system metadata & for admin activities. YB-TServer is responsible for data I/O. Specify YB-Master and YB-TServer attributes under `master`/`tserver`. The valid attributes are as described below. These two are **required** fields. #### Replicas diff --git a/docs/content/latest/deploy/manual-deployment/_index.html b/docs/content/latest/deploy/manual-deployment/_index.html index 27be7ed5a546..4cec7a8b7a25 100644 --- a/docs/content/latest/deploy/manual-deployment/_index.html +++ b/docs/content/latest/deploy/manual-deployment/_index.html @@ -14,10 +14,11 @@ weight: 610 --- -For a sample, step-by-step guide to setting up a multi-node YugabyteDB deployment in a single -availability zone (AZ), multi-AZ, or multi-region manner on, for example, AWS -instances , see detailed instructions here. The -steps can be easily adopted for on-premise deployments or deployments in other clouds. +This section covers the generic manual deployment of a single YugabyteDB cluster in a single region or data center with a multi-zone/multi-rack configuration. Note that single zone configuration is a special case of multi-zone where all placement related flags are set to the same value across every node. + +

+ +For AWS deployments specifically, a step-by-step guide to deploying a YugabyteDB cluster is also available. These steps can be easily adopted for on-premise deployments or deployments in other clouds.

@@ -46,7 +47,7 @@
-
3. Start YB-Master services
+
3. Start YB-Masters
Start the YB-Master service. @@ -57,7 +58,7 @@
-
4. Start YB-TServer services
+
4. Start YB-TServers
Start the YB-TServer service. diff --git a/docs/content/latest/deploy/manual-deployment/start-masters.md b/docs/content/latest/deploy/manual-deployment/start-masters.md index dd4da51210ec..d6b6c9776ccc 100644 --- a/docs/content/latest/deploy/manual-deployment/start-masters.md +++ b/docs/content/latest/deploy/manual-deployment/start-masters.md @@ -14,45 +14,49 @@ showAsideToc: true --- {{< note title="Note" >}} - -- The number of nodes of a cluster on which the YB-Master server need to be started **must** equal the replication factor. +- The number of nodes in a cluster running YB-Masters **must** equal the replication factor. - The number of comma-separated addresses present in `master_addresses` should also equal the replication factor. - +- For running a single cluster across multiple data centers or 2 clusters in 2 data centers, refer to the [Multi-DC Deployments](../../../deploy/multi-dc/) section. {{< /note >}} -## Example scenario - -Let us assume the following. - -- We want to create a a 4 node cluster with replication factor `3`. - - We would need to run the YB-Master process on only three of the nodes, for example, `node-a`, `node-b`, `node-c`. - - Let us assume their private IP addresses are `172.151.17.130`, `172.151.17.220`, and `172.151.17.140`. -- We have multiple data drives mounted on `/home/centos/disk1`, `/home/centos/disk2`. +This section covers deployment for a single region or data center in a multi-zone/multi-rack configuration. Note that single zone configuration is a special case of multi-zone where all placement related flags are set to the same value across every node. -This section covers deployment for a single region or zone (or a single data center or rack). Execute the following steps on each of the instances. +## Example scenario -## Run YB-Master services with command line parameters +- Create a 6-node cluster with replication factor 3. + - YB-Master server should run on only 3 these nodes but as noted in the next section, the YB-TServer server should run on all 6 nodes. + - Assume the 3 YB-Master private IP addresses are `172.151.17.130`, `172.151.17.220` and `172.151.17.140`. + - Cloud will be `aws`, region will be `us-west` and the 3 AZs will be `us-west-2a`, `us-west-2b`, `us-west-2c`. 2 nodes will be placed in each AZ in such a way that 1 replica for each tablet (aka shard) gets placed in any 1 node for each AZ. +- Multiple data drives mounted on `/home/centos/disk1`, `/home/centos/disk2`. -- Run `yb-master` binary on each of the nodes as shown below. Note how multiple directories can be provided to the `--fs_data_dirs` option. For each YB-Master service, replace the RPC bind address configuration with the private IP address of the host running the YB-Master. +## Run YB-Master servers with command line parameters -For the full list of configuration options (or flags), see the [YB-Master reference](../../../reference/configuration/yb-master/). +Run the `yb-master` server on each of the 3 nodes as shown below. Note how multiple directories can be provided to the `--fs_data_dirs` option. Replace the `rpc_bind_addresses` value with the private IP address of the host as well as the set the `placement_cloud`,`placement_region` and `placement_zone` values appropriately. For single zone deployment, simply use the same value for the `placement_zone` flag. ```sh $ ./bin/yb-master \ --master_addresses 172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 \ --rpc_bind_addresses 172.151.17.130 \ --fs_data_dirs "/home/centos/disk1,/home/centos/disk2" \ + --placement_cloud aws \ + --placement_region us-west \ + --placement_zone us-west-2a \ >& /home/centos/disk1/yb-master.out & ``` -## Run YB-Master services with configuration file +For the full list of configuration options (or flags), see the [YB-Master reference](../../../reference/configuration/yb-master/). + +## Run YB-Master servers with configuration file -- Alternatively, you can also create a `master.conf` file with the following flags and then run `yb-master` with the `--flagfile` option as shown below. For each YB-Master service, replace the RPC bind address configuration option with the private IP address of the YB-Master service. +Alternatively, you can also create a `master.conf` file with the following flags and then run `yb-master` with the `--flagfile` option as shown below. For each YB-Master server, replace the RPC bind address configuration option with the private IP address of the YB-Master server. ```sh --master_addresses=172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 --rpc_bind_addresses=172.151.17.130 --fs_data_dirs=/home/centos/disk1,/home/centos/disk2 +--placement_cloud=aws +--placement_region=us-west +--placement_zone=us-west-2a ``` ```sh @@ -61,7 +65,7 @@ $ ./bin/yb-master --flagfile master.conf >& /home/centos/disk1/yb-master.out & ## Verify health -- Make sure all the 3 yb-masters are now working as expected by inspecting the INFO log. The default logs directory is always inside the first directory specified in the `--fs_data_dirs` flag. +Make sure all the 3 yb-masters are now working as expected by inspecting the INFO log. The default logs directory is always inside the first directory specified in the `--fs_data_dirs` flag. ```sh $ cat /home/centos/disk1/yb-data/master/logs/yb-master.INFO diff --git a/docs/content/latest/deploy/manual-deployment/start-tservers.md b/docs/content/latest/deploy/manual-deployment/start-tservers.md index 2200cf5979a0..94ae219c8166 100644 --- a/docs/content/latest/deploy/manual-deployment/start-tservers.md +++ b/docs/content/latest/deploy/manual-deployment/start-tservers.md @@ -15,49 +15,52 @@ showAsideToc: true {{< note title="Note" >}} -The number of nodes of a cluster on which the YB-TServer server needs to be started **must** equal or exceed the replication factor in order for any table to get created successfully. +- The number of nodes in a cluster running YB-TServers **must** equal or exceed the replication factor in order for any table to get created successfully. +- For running a single cluster across multiple data centers or 2 clusters in 2 data centers, refer to the [Multi-DC Deployments](../../../deploy/multi-dc/) section. {{< /note >}} -## Example scenario - -Let us assume the following. +This section covers deployment for a single region or data center in a multi-zone/multi-rack configuration. Note that single zone configuration is a special case of multi-zone where all placement related flags are set to the same value across every node. -- We want to create a a 4-node cluster with replication factor of `3`. - - We would need to run the YB-TServer process on all the 4 nodes say `node-a`, `node-b`, `node-c`, `node-d` - - Let us assume the master private IP addresses are `172.151.17.130`, `172.151.17.220` and `172.151.17.140` (`node-a`, `node-b`, `node-c`) -- We have multiple data drives mounted on `/home/centos/disk1`, `/home/centos/disk2` +## Example scenario -This section covers deployment for a single region/zone (or a single data center/rack). Execute the following steps on each of the instances. +- Create a 6-node cluster with replication factor of 3. + - YB-TServer server should on all the 6 nodes but as noted in the previous section, the YB-Master server should run on only 3 of these nodes. + - Assume the 3 YB-Master private IP addresses are `172.151.17.130`, `172.151.17.220` and `172.151.17.140`. + - Cloud will be `aws`, region will be `us-west` and the 3 AZs will be `us-west-2a`, `us-west-2b`, `us-west-2c`. 2 nodes will be placed in each AZ in such a way that 1 replica for each tablet (aka shard) gets placed in any 1 node for each AZ. +- Multiple data drives mounted on `/home/centos/disk1`, `/home/centos/disk2` ## Run YB-TServer with command line options -- Run the YB-TServer service (`yb-tserver`) as shown here. Note that all of the master addresses have to be provided using the `--tserver_master_addrs` option. For each YB-TServer, replace the RPC bind address configuration option with the private IP address of the YB-TServer service. - -For the full list of configuration options, see the [YB-TServer reference](../../../reference/configuration/yb-tserver/). +Run the `yb-tserver` server on each of the 6 nodes as shown below. Note that all of the master addresses have to be provided using the `--tserver_master_addrs` option. Replace the `rpc_bind_addresses` value with the private IP address of the host as well as the set the `placement_cloud`,`placement_region` and `placement_zone` values appropriately. For single zone deployment, simply use the same value for the `placement_zone` flag. ```sh $ ./bin/yb-tserver \ --tserver_master_addrs 172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 \ --rpc_bind_addresses 172.151.17.130 \ --start_pgsql_proxy \ - --pgsql_proxy_bind_address=172.151.17.130:5433 \ - --cql_proxy_bind_address=172.151.17.130:9042 \ + --pgsql_proxy_bind_address 172.151.17.130:5433 \ + --cql_proxy_bind_address 172.151.17.130:9042 \ --fs_data_dirs "/home/centos/disk1,/home/centos/disk2" \ + --placement_cloud aws \ + --placement_region us-west \ + --placement_zone us-west-2a \ >& /home/centos/disk1/yb-tserver.out & ``` +For the full list of configuration options, see the [YB-TServer reference](../../../reference/configuration/yb-tserver/). + If you need to turn on the YEDIS API as well, add `--redis_proxy_bind_address=172.151.17.130:6379` to the above list. {{< note title="Note" >}} -The number of comma-separated values in the `--tserver_master_addrs` option should match the total number of YB-Master services (or the replication factor). +The number of comma-separated values in the `--tserver_master_addrs` option should match the total number of YB-Master servers (or the replication factor). {{< /note >}} ## Run YB-TServer with configuration file -- Alternatively, you can also create a `tserver.conf` file with the following flags and then run the `yb-tserver` with the `--flagfile` option as shown here. For each YB-TServer service, replace the RPC bind address flags with the private IP address of the host running the YB-TServer service. +Alternatively, you can also create a `tserver.conf` file with the following flags and then run the `yb-tserver` with the `--flagfile` option as shown here. For each YB-TServer server, replace the RPC bind address flags with the private IP address of the host running the YB-TServer server. ```sh --tserver_master_addrs=172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 @@ -66,6 +69,9 @@ The number of comma-separated values in the `--tserver_master_addrs` option shou --pgsql_proxy_bind_address=172.151.17.130:5433 --cql_proxy_bind_address=172.151.17.130:9042 --fs_data_dirs=/home/centos/disk1,/home/centos/disk2 +--placement_cloud=aws +--placement_region=us-west +--placement_zone=us-west-2a ``` Add `--redis_proxy_bind_address=172.22.25.108:6379` to the above list if you need to turn on the YEDIS API as well. @@ -74,9 +80,68 @@ Add `--redis_proxy_bind_address=172.22.25.108:6379` to the above list if you nee $ ./bin/yb-tserver --flagfile tserver.conf >& /home/centos/disk1/yb-tserver.out & ``` +## Set replica placement policy + +{{< note title="Note" >}} + +This step is required for only multi-AZ deployments and can be skipped for a single AZ deployment. + +{{< /note >}} + +The default replica placement policy when the cluster is first created is to treat all nodes as equal irrespective of the placement_* configuration flags. However, for the current deployment, we want to explicitly place 1 replica of each tablet in each AZ. The following command sets replication factor of 3 across `us-west-2a`, `us-west-2b`, `us-west-2c` leading to such a placement. + +On any host running the yb-master, run the following command. + +```sh +$ ./bin/yb-admin \ + --master_addresses 172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 \ + modify_placement_info \ + aws.us-west.us-west-2a,aws.us-west.us-west-2b,aws.us-west.us-west-2c 3 +``` + +Verify by running the following. + +```sh +$ curl -s http://:7000/cluster-config +``` + +And confirm that the output looks similar to what is shown below with `min_num_replicas` set to 1 for each AZ. + +``` +replication_info { + live_replicas { + num_replicas: 3 + placement_blocks { + cloud_info { + placement_cloud: "aws" + placement_region: "us-west" + placement_zone: "us-west-2a" + } + min_num_replicas: 1 + } + placement_blocks { + cloud_info { + placement_cloud: "aws" + placement_region: "us-west" + placement_zone: "us-west-2b" + } + min_num_replicas: 1 + } + placement_blocks { + cloud_info { + placement_cloud: "aws" + placement_region: "us-west" + placement_zone: "us-west-2b" + } + min_num_replicas: 1 + } + } +} +``` + ## Verify health -Make sure all four YB-TServer services are now working as expected by inspecting the INFO log. The default logs directory is always inside the first directory specified in the `--fs_data_dirs` flag. +Make sure all YB-TServer servers are now working as expected by inspecting the INFO log. The default logs directory is always inside the first directory specified in the `--fs_data_dirs` flag. You can do this as shown below. diff --git a/docs/content/latest/deploy/manual-deployment/system-config.md b/docs/content/latest/deploy/manual-deployment/system-config.md index 180cf73ceb7b..ba2a3d01f5c2 100644 --- a/docs/content/latest/deploy/manual-deployment/system-config.md +++ b/docs/content/latest/deploy/manual-deployment/system-config.md @@ -28,7 +28,7 @@ Here's the command to install these packages. $ sudo yum install -y epel-release ntp ``` -## Setting ulimits +## ulimits In Linux, `ulimit` is used to limit and control the usage of system resources (threads, files, and network connections) on a per-process or per-user basis. @@ -81,7 +81,7 @@ $ ulimit -n {{< note title="Note" >}} -- After changing a ulimit setting, the YB-Master and YB-TServer services must be restarted in order for the new settings to take effect. Check the `/proc/` file to see the current settings. +- After changing a ulimit setting, the YB-Master and YB-TServer servers must be restarted in order for the new settings to take effect. Check the `/proc/` file to see the current settings. - Changes made using ulimit may revert following a system restart depending on the system configuration. {{< /note >}} diff --git a/docs/content/latest/deploy/manual-deployment/verify-deployment.md b/docs/content/latest/deploy/manual-deployment/verify-deployment.md index 189cd2590b1e..6e5c73f7ac23 100644 --- a/docs/content/latest/deploy/manual-deployment/verify-deployment.md +++ b/docs/content/latest/deploy/manual-deployment/verify-deployment.md @@ -13,9 +13,9 @@ isTocNested: true showAsideToc: true --- -As before, we shall assume that we brought up a universe on four nodes with replication factor `3`. Let us assume their IP addresses are `172.151.17.130`, `172.151.17.220`, `172.151.17.140` and `172.151.17.150` +We now have a cluster/universe on 6 nodes with replication factor `3`. Assume their IP addresses are `172.151.17.130`, `172.151.17.220`, `172.151.17.140`, `172.151.17.150`, `172.151.17.160` and `172.151.17.170`. YB-Master servers are running on only the first 3 of these nodes. -## [Optional] Setup YEDIS service +## [Optional] Setup YEDIS API {{< note title="Note" >}} @@ -23,7 +23,7 @@ If you want this cluster to be able to support Redis clients, you **must** perfo {{< /note >}} -While the YCQL and YSQL services are turned on by default after all of the YB-TServers start, the Redis-compatible YEDIS service is off by default. If you want this cluster to be able to support Redis clients, run the following command from any of the 4 instances. The command below will add the special Redis table into the DB and also start the YEDIS server on port 6379 on all instances. +While the YCQL and YSQL APIs are turned on by default after all of the YB-TServers start, the Redis-compatible YEDIS API is off by default. If you want this cluster to be able to support Redis clients, run the following command from any of the 4 instances. The command below will add the special Redis table into the DB and also start the YEDIS server on port 6379 on all instances. ```sh $ ./bin/yb-admin --master_addresses 172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 setup_redis_table @@ -45,22 +45,22 @@ If this is a public cloud deployment, remember to use the public ip for the node ## Connect clients -- Clients can connect to YSQL API at: +- Clients can connect to YSQL API at ```sh -172.151.17.130:5433,172.151.17.220:5433,172.151.17.140:5433,172.151.17.150:5433 +172.151.17.130:5433,172.151.17.220:5433,172.151.17.140:5433,172.151.17.150:5433,172.151.17.160:5433,172.151.17.170:5433 ``` -- Clients can connect to YCQL API at: +- Clients can connect to YCQL API at ```sh -172.151.17.130:9042,172.151.17.220:9042,172.151.17.140:9042,172.151.17.150:9042 +172.151.17.130:9042,172.151.17.220:9042,172.151.17.140:9042,172.151.17.150:9042,172.151.17.160:9042,172.151.17.170:9042 ``` -- Clients can connect to YEDIS API at: +- Clients can connect to YEDIS API at ```sh -172.151.17.130:6379,172.151.17.220:6379,172.151.17.140:6379,172.151.17.150:6379 +172.151.17.130:6379,172.151.17.220:6379,172.151.17.140:6379,172.151.17.150:6379,172.151.17.160:6379,172.151.17.170:6379 ``` ## Default ports reference diff --git a/docs/content/latest/deploy/replicate-2dc.md b/docs/content/latest/deploy/multi-dc/2dc-deployment.md similarity index 80% rename from docs/content/latest/deploy/replicate-2dc.md rename to docs/content/latest/deploy/multi-dc/2dc-deployment.md index 75e7894d0a6a..742947aa319a 100644 --- a/docs/content/latest/deploy/replicate-2dc.md +++ b/docs/content/latest/deploy/multi-dc/2dc-deployment.md @@ -5,19 +5,28 @@ description: Two data center (2DC) deployments beta: /faq/product/#what-is-the-definition-of-the-beta-feature-tag menu: latest: - parent: deploy - identifier: replicate-2dc + parent: multi-dc + identifier: 2dc-deployment weight: 633 +aliases: + - /latest/deploy/replicate-2dc/ type: page isTocNested: true showAsideToc: true --- + +{{< tip title="Recommended Reading" >}} + +[9 Techniques to Build Cloud-Native, Geo-Distributed SQL Apps with Low Latency](https://blog.yugabyte.com/9-techniques-to-build-cloud-native-geo-distributed-sql-apps-with-low-latency/) highlights the various multi-DC deployment strategies (including 2DC deployments) for a distributed SQL database like YugabyteDB. + +{{< /tip >}} + For details on the two data center (2DC) deployment architecture and supported replication scenarios, see [Two data center (2DC) deployments](../../architecture/2dc-deployments). -Follow the steps below to set up a two data center (2DC) deployment using either unidirectional (aka master-follower) or bidirectional (aka multi-master) replication between the data centers. +Follow the steps below to set up a 2DC deployment using either unidirectional (aka master-follower) or bidirectional (aka multi-master) replication between the data centers. -## Set up +## 1. Set up ### Producer universe @@ -39,7 +48,7 @@ Make sure to create the same tables as you did for the producer universe. After creating the required tables, you can now set up aysnchronous replication using the steps below. -## Unidirectional (aka master-follower) replication +## 2. Unidirectional (aka master-follower) replication 1. Look up the producer universe UUID and the table IDs for the two tables and the index table on master UI. @@ -67,13 +76,13 @@ There should be three table IDs in the command above — two of those are YSQL f {{< /note >}} -## Bidirectional (aka multi-master) replication +## 3. Bidirectional (aka multi-master) replication To set up bidirectional replication, follow the steps above in the Unidirectional replication section above and then do the same steps for the the “yugabyte-consumer” universe. Note that this time, “yugabyte-producer” will be set up to consume data from “yugabyte-consumer”. -## Load data into producer universe +## 4. Load data into producer universe 1. Download the YugabyteDB workload generator JAR file (`yb-sample-apps.jar`) from [GitHub](https://github.com/yugabyte/yb-sample-apps). @@ -93,7 +102,7 @@ java -jar yb-sample-apps.jar --workload CassandraBatchKeyValue --nodes 127.0.0.1 For bidirectional replication, repeat this step in the "yugabyte-consumer" universe. -## Verify replication +## 5. Verify replication **For unidirectional replication** diff --git a/docs/content/latest/deploy/multi-dc/3dc-deployment.md b/docs/content/latest/deploy/multi-dc/3dc-deployment.md new file mode 100644 index 000000000000..575e0f17d01a --- /dev/null +++ b/docs/content/latest/deploy/multi-dc/3dc-deployment.md @@ -0,0 +1,141 @@ +--- +title: Three+ data center (3DC) +linkTitle: Three+ data center (3DC) +description: Three or more (3DC) deployments +menu: + latest: + parent: multi-dc + identifier: 3dc-deployment + weight: 632 +type: page +isTocNested: true +showAsideToc: true +--- + +{{< tip title="Recommended Reading" >}} + +[9 Techniques to Build Cloud-Native, Geo-Distributed SQL Apps with Low Latency](https://blog.yugabyte.com/9-techniques-to-build-cloud-native-geo-distributed-sql-apps-with-low-latency/) highlights the various multi-DC deployment strategies (including 3DC deployments) for a distributed SQL database like YugabyteDB. + +{{< /tip >}} + +Three data center deployments of YugabyteDB are essentially a natural extension of the three availability zone (AZ) deployments documented in the [Manual deployment](../../../deploy/manual-deployment/) section. Equal number of nodes are now placed in each data center of the three data centers. Inside a single data center, a multi-AZ deployment is recommended to ensure resilience against zone failures. + +## Example scenario + +- Create a 3-node cluster with replication factor `3`. + - Cloud will be `aws` and the 3 regions/AZs will be `us-west`/`us-west-2a`, `us-east-1`/`us-east-1a`, `ap-northeast-1`/`ap-northeast-1a`. One node will be placed in each region/AZ in such a way that one replica for each tablet also gets placed in each region/AZ. + - Private IP addresses of the 3 nodes are `172.151.17.130`, `172.151.17.220`, and `172.151.17.140`. +- We have multiple data drives mounted on `/home/centos/disk1`, `/home/centos/disk2`. + +## Prerequisites + +Follow the [Checklist](../../../deploy/checklist/) to ensure you have prepared the nodes for installing YugabyteDB. + +Execute the following steps on each of the instances. + +## 1. Install software + +Follow the [installation instructions](../../../deploy/manual-deployment/install-software) to install YugabyteDB on each of the nodes. + +## 2. Start YB-Masters + +Run the `yb-master` server on each of the nodes as shown below. Note how multiple directories can be provided to the `--fs_data_dirs` option. Replace the `rpc_bind_addresses` value with the private IP address of the host as well as the set the `placement_cloud`,`placement_region` and `placement_zone` values appropriately. + +```sh +$ ./bin/yb-master \ + --master_addresses 172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 \ + --rpc_bind_addresses 172.151.17.130 \ + --fs_data_dirs "/home/centos/disk1,/home/centos/disk2" \ + --placement_cloud aws \ + --placement_region us-west \ + --placement_zone us-west-2a \ + --leader_failure_max_missed_heartbeat_periods 10 \ + >& /home/centos/disk1/yb-master.out & +``` + +Note that we also set the `leader_failure_max_missed_heartbeat_periods` flag to 10. This flag specifies the maximum heartbeat periods that the leader can fail to heartbeat before the leader is considered to be failed. Since the data is geo-replicated across data centers, RPC latencies are expected to be higher. We use this flag to increase the failure detection interval in such a higher RPC latency deployment. Note that the total failure timeout is now 5 seconds since it is computed by multiplying raft_heartbeat_interval_ms (default of 500ms) with leader_failure_max_missed_heartbeat_periods (current value of 10). + +For the full list of configuration flags, see the [YB-Master reference](../../../reference/configuration/yb-master/). + +## 3. Start YB-TServers + +Run the `yb-tserver` server on each node as shown below . Note that all of the master addresses have to be provided using the `--tserver_master_addrs` option. Replace the `rpc_bind_addresses` value with the private IP address of the host as well as the set the `placement_cloud`,`placement_region` and `placement_zone` values appropriately. + +```sh +$ ./bin/yb-tserver \ + --tserver_master_addrs 172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 \ + --rpc_bind_addresses 172.151.17.130 \ + --start_pgsql_proxy \ + --pgsql_proxy_bind_address 172.151.17.130:5433 \ + --cql_proxy_bind_address 172.151.17.130:9042 \ + --fs_data_dirs "/home/centos/disk1,/home/centos/disk2" \ + --placement_cloud aws \ + --placement_region us-west \ + --placement_zone us-west-2a \ + --leader_failure_max_missed_heartbeat_periods 10 \ + >& /home/centos/disk1/yb-tserver.out & +``` + +Note that we also set the `leader_failure_max_missed_heartbeat_periods` flag to 10. This flag specifies the maximum heartbeat periods that the leader can fail to heartbeat before the leader is considered to be failed. Since the data is geo-replicated across data centers, RPC latencies are expected to be higher. We use this flag to increase the failure detection interval in such a higher RPC latency deployment. Note that the total failure timeout is now 5 seconds since it is computed by multiplying raft_heartbeat_interval_ms (default of 500ms) with leader_failure_max_missed_heartbeat_periods (current value of 10). + +For the full list of configuration flags, see the [YB-TServer reference](../../../reference/configuration/yb-tserver/). + +## 4. Set replica placement policy + +The default replica placement policy when the cluster is first created is to treat all nodes as equal irrespective of the placement_* configuration flags. However, for the current deployment, we want to explicitly place 1 replica of each tablet in each region/AZ. The following command sets replication factor of 3 across `us-west-2`/`us-west-2a`, `us-east-1`/`us-east-1a`, `ap-northeast-1`/`ap-northeast-1a` leading to such a placement. + +On any host running the yb-master, run the following command. + +```sh +$ ./bin/yb-admin \ + --master_addresses 172.151.17.130:7100,172.151.17.220:7100,172.151.17.140:7100 \ + modify_placement_info \ + aws.us-west.us-west-2a,aws.us-east-1.us-east-1a,aws.ap-northeast-1.ap-northeast-1a 3 +``` + +Verify by running the following. + +```sh +$ curl -s http://:7000/cluster-config +``` + +And confirm that the output looks similar to what is shown below with `min_num_replicas` set to 1 for each AZ. + +``` +replication_info { + live_replicas { + num_replicas: 3 + placement_blocks { + cloud_info { + placement_cloud: "aws" + placement_region: "us-west" + placement_zone: "us-west-2a" + } + min_num_replicas: 1 + } + placement_blocks { + cloud_info { + placement_cloud: "aws" + placement_region: "us-east-1" + placement_zone: "us-east-1a" + } + min_num_replicas: 1 + } + placement_blocks { + cloud_info { + placement_cloud: "aws" + placement_region: "ap-northeast-1" + placement_zone: "ap-northeast-1a" + } + min_num_replicas: 1 + } + } +} +``` + + +## 5. Verify deployment + + +Use the [ysqlsh](../../../../admin/ysqlsh/) (for YSQL API) or [cqlsh](../../../../admin/cqlsh/) (for YCQL API) shells to test connectivity to the cluster. + diff --git a/docs/content/latest/deploy/multi-dc/_index.html b/docs/content/latest/deploy/multi-dc/_index.html new file mode 100644 index 000000000000..dcac4f468a4d --- /dev/null +++ b/docs/content/latest/deploy/multi-dc/_index.html @@ -0,0 +1,47 @@ +--- +title: Multi-DC deployments +linkTitle: Multi-DC deployments +description: Multi-DC deployments +headcontent: Deploy YugabyteDB across multiple data centers (DC). +image: /images/section_icons/explore/planet_scale.png +menu: + latest: + identifier: multi-dc + parent: deploy + weight: 631 +--- + +YugabyteDB is a geo-distributed SQL database that can be easily deployed across multiple DCs or cloud regions. There are two primary configurations for such multi-DC deployments. +

+First configuration uses a single cluster stretched across 3 or more data centers with data getting automatically sharded across all data centers. This configuration is default for Spanner-inspired databases like YugabyteDB. Data replication across data centers is synchronous and is based on the Raft consensus protocol. This means writes are globally consistent and reads are either globally consistent or timeline consistent (when application clients use follower reads). Additionally, resilience against data center failures is fully automatic. However, this configuration has the potential to incur Wide Area Network (WAN) latency in the write path if the data centers are geographically located far apart from each other and are connected through the shared/unreliable Internet. +

+For users not requiring global consistency and automatic resilience to datacenter failures, the above WAN latency can be eliminated altogether through the second configuration where two independent, single-DC clusters are connected through asynchronous replication based on Change Data Capture. +

+9 Techniques to Build Cloud-Native, Geo-Distributed SQL Apps with Low Latency highlights the various multi-DC deployment strategies for a distributed SQL database like YugabyteDB. Note that YugabyteDB is the only Spanner-inspired distributed SQL database to support a 2DC deployment. +

+ +

diff --git a/docs/content/latest/deploy/public-clouds/aws/manual-deployment.md b/docs/content/latest/deploy/public-clouds/aws/manual-deployment.md index 791d8cbe52dc..885456c7e7e2 100644 --- a/docs/content/latest/deploy/public-clouds/aws/manual-deployment.md +++ b/docs/content/latest/deploy/public-clouds/aws/manual-deployment.md @@ -313,7 +313,7 @@ for ip in $ALL_NODES; do \ done ``` -The advantage of using symbolic links (symlinks) is that, when you later need to do a rolling software upgrade, you can upgrade YB-Master and YB-TServer services one at a time by stopping the YB-Master service, switching the link to the new release, and starting the YB-Master service. Then, do the same for YB-TServer services. +The advantage of using symbolic links (symlinks) is that, when you later need to do a rolling software upgrade, you can upgrade YB-Master and YB-TServer servers one at a time by stopping the YB-Master server, switching the link to the new release, and starting the YB-Master server. Then, do the same for YB-TServer servers. ## 3. Prepare YB-Master configuration files @@ -402,7 +402,7 @@ done ) ``` -### Create configuration file for AZ2 YB-TServer services +### Create configuration file for AZ2 YB-TServer servers ```sh (CLOUD=aws; REGION=us-west; AZ=us-west-2b; CONFIG_FILE=~/yb-conf/tserver.conf; \ @@ -424,7 +424,7 @@ done ) ``` -### Create configuration file for AZ3 YB-TServer services +### Create configuration file for AZ3 YB-TServer servers ```sh (CLOUD=aws; REGION=us-west; AZ=us-west-2c; CONFIG_FILE=~/yb-conf/tserver.conf; \ @@ -457,9 +457,9 @@ for ip in $ALL_NODES; do \ done ``` -## 5. Start YB-Master services +## 5. Start YB-Master servers -Note: On the first time when all three YB-Master services are started, it creates the cluster. If a YB-Master service is restarted (after cluster has been created) such as during a rolling upgrade of software it simply rejoins the cluster. +Note: On the first time when all three YB-Master servers are started, it creates the cluster. If a YB-Master server is restarted (after cluster has been created) such as during a rolling upgrade of software it simply rejoins the cluster. ```sh for ip in $MASTER_NODES; do \ @@ -472,7 +472,7 @@ done ### Verify -Verify that the YB-Master services are running. +Verify that the YB-Master servers are running. ```sh for ip in $MASTER_NODES; do \ @@ -481,7 +481,7 @@ for ip in $MASTER_NODES; do \ done ``` -Check the YB-Master UI by going to any of the 3 YB-Master services. +Check the YB-Master UI by going to any of the 3 YB-Master servers. ``` http://:7000/ @@ -495,11 +495,11 @@ $ links http://:7000/ ### Troubleshooting -Make sure all the ports detailed in the earlier section are opened up. Else, check the log at `/mnt/d0/yb-master.out` for `stdout` or `stderr` output from the YB-Master service. Also, check INFO/WARNING/ERROR/FATAL glogs output by the process in the `/mnt/d0/yb-data/master/logs/*` +Make sure all the ports detailed in the earlier section are opened up. Else, check the log at `/mnt/d0/yb-master.out` for `stdout` or `stderr` output from the YB-Master server. Also, check INFO/WARNING/ERROR/FATAL glogs output by the process in the `/mnt/d0/yb-data/master/logs/*` -## 6. Start YB-TServer services +## 6. Start YB-TServer servers -After starting all the YB-Master services in the previous step, start YB-TServer services on all the nodes. +After starting all the YB-Master servers in the previous step, start YB-TServer servers on all the nodes. ```sh for ip in $ALL_NODES; do \ @@ -510,7 +510,7 @@ for ip in $ALL_NODES; do \ done ``` -Verify that the YB-TServer services are running. +Verify that the YB-TServer servers are running. ```sh for ip in $ALL_NODES; do \ @@ -523,9 +523,7 @@ done Note: This example is a multi-AZ (single region deployment). -The default replica placement policy when the cluster is first created is to treat all nodes as equal irrespective of the placement_* configuration flags. -However, for the current deployment, we want to explicitly place 1 replica in each AZ. -The following command sets replication factor of 3 across `us-west-2a`, `us-west-2b` and `us-west-2c` leading to the placement of 1 replica in each AZ. +The default replica placement policy when the cluster is first created is to treat all nodes as equal irrespective of the placement_* configuration flags. However, for the current deployment, we want to explicitly place 1 replica in each AZ. The following command sets replication factor of 3 across `us-west-2a`, `us-west-2b` and `us-west-2c` leading to the placement of 1 replica in each AZ. ```sh ssh -i $PEM $ADMIN_USER@$MASTER1 \ @@ -574,11 +572,7 @@ replication_info { } ``` -Suppose your deployment is multi-region rather than multi-zone, one additional -option to consider is to set a preferred location for all the tablet leaders -using the [set_preferred_zones yb-admin command](../../../admin/yb-admin). -For multi-row/multi-table transactional operations, colocating the leaders to be in a single zone/region can help reduce the number of -cross-region network hops involved in executing the transaction and as a result improve performance. +Suppose your deployment is multi-region rather than multi-zone, one additional option to consider is to set a preferred location for all the tablet leaders using the [set_preferred_zones yb-admin command](../../../admin/yb-admin). For multi-row/multi-table transactional operations, colocating the leaders to be in a single zone/region can help reduce the number of cross-region network hops involved in executing the transaction and as a result improve performance. The following command sets the preferred zone to `aws.us-west.us-west-2c`: @@ -631,7 +625,7 @@ replication_info { ## 8. Test PostgreSQL-compatible YSQL API Connect to the cluster using the `ysqlsh` utility that comes pre-bundled in the `bin` directory. -If you need to try `ysqlsh` from a different node, you can download `ysqlsh` using instructions documented [here](../../../develop/tools/ysqlsh/). +If you need to try `ysqlsh` from a different node, you can download `ysqlsh` using instructions documented [here](../../../admin/ysqlsh/). From any node, execute the following command. @@ -669,7 +663,7 @@ Output should be the following: ### Using cqlsh -Connect to the cluster using the `cqlsh` utility that comes pre-bundled in the `bin` directory. If you need to try cqlsh from a different node, you can download cqlsh using instructions documented [here](../../../develop/tools/cqlsh/). +Connect to the cluster using the `cqlsh` utility that comes pre-bundled in the `bin` directory. If you need to try cqlsh from a different node, you can download cqlsh using instructions documented [here](../../../admin/cqlsh/). From any node, execute the following command. diff --git a/docs/content/latest/develop/ecosystem-integrations/apache-kafka.md b/docs/content/latest/develop/ecosystem-integrations/apache-kafka.md index b2def9b78dfc..8bdf33e0566c 100644 --- a/docs/content/latest/develop/ecosystem-integrations/apache-kafka.md +++ b/docs/content/latest/develop/ecosystem-integrations/apache-kafka.md @@ -13,7 +13,7 @@ isTocNested: true showAsideToc: true --- -In this tutorial, we are going to use the [Kafka Connect-based Sink Connector for YugabyteDB](https://github.com/yugabyte/yb-kafka-connector) to store events from Apache Kafka into YugabyteDB using YugabyteDB's [YCQL](../../../api/ycql) API. +In this tutorial, we are going to use the [Kafka Connect-based Sink Connector for YugabyteDB](https://github.com/yugabyte/yb-kafka-connector) to store events from Apache Kafka into YugabyteDB using the [YCQL](../../../api/ycql) API. ## 1. Start local cluster diff --git a/docs/content/latest/explore/binary/auto-sharding.md b/docs/content/latest/explore/binary/auto-sharding.md index a04650a43531..2f7aa1e4c1c3 100644 --- a/docs/content/latest/explore/binary/auto-sharding.md +++ b/docs/content/latest/explore/binary/auto-sharding.md @@ -19,7 +19,7 @@ $ ./bin/yb-ctl --rf 1 --num_shards_per_tserver 4 create \ --tserver_flags "memstore_size_mb=1" ``` -This example creates a universe with one node. Now, let's add two more nodes to make this a 3-node, rf=1 universe. We need to pass the memstore size flag to each of the added YB-TServer services. You can do that by running the following: +This example creates a universe with one node. Now, let's add two more nodes to make this a 3-node, rf=1 universe. We need to pass the memstore size flag to each of the added YB-TServer servers. You can do that by running the following: ```sh $ ./bin/yb-ctl add_node --tserver_flags "memstore_size_mb=1" @@ -29,7 +29,7 @@ $ ./bin/yb-ctl add_node --tserver_flags "memstore_size_mb=1" $ ./bin/yb-ctl add_node --tserver_flags "memstore_size_mb=1" ``` -We can check the status of the cluster to confirm that we have three YB-TServer services. +We can check the status of the cluster to confirm that we have three YB-TServer servers. ```sh $ ./bin/yb-ctl status diff --git a/docs/content/latest/explore/binary/two-data-centers.md b/docs/content/latest/explore/binary/two-data-centers.md index d69d7953f30e..bca14427b801 100644 --- a/docs/content/latest/explore/binary/two-data-centers.md +++ b/docs/content/latest/explore/binary/two-data-centers.md @@ -100,7 +100,7 @@ To configure "Data Center - West" to be the consumer of data changes from the "D yb-admin -master_addresses setup_universe_replication ``` -- *consumer-master-addresses*: a comma-separated list of the YB-Master services. For this simulation, you have one YB-Master service for each cluster (typically, there are three). +- *consumer-master-addresses*: a comma-separated list of the YB-Master servers. For this simulation, you have one YB-Master server for each cluster (typically, there are three). - *producer-universe-uuid*: a unique identifier for the producer cluster. The UUID can be found in the YB-Master UI (`:7000`). - *producer-table-ids*: A comma-separated list of `table_id` values (the generated UUIDs can be found in the YB-Master UI (`:7000`). diff --git a/docs/content/latest/faq/compatibility.md b/docs/content/latest/faq/compatibility.md index 4b17b7411fc9..99f80aa1cc28 100644 --- a/docs/content/latest/faq/compatibility.md +++ b/docs/content/latest/faq/compatibility.md @@ -25,13 +25,13 @@ The [YSQL](../../api/ysql) API is compatible with PostgreSQL. This means Postgre - YugabyteDB's API compatibility is aimed at accelerating developer onboarding. By integrating well with the existing ecosystem, YugabyteDB ensures that developers can get started easily using a language they are already comfortable with. -- YugabyteDB's API compatibility is not aimed at lift-and-shift porting of existing applications written for the original language. This is because existing applications are not written to take advantage of the distributed SQL APIs provided by YugabyteDB. For such existing applications, developers should expect to modify their previously monolithic PostgreSQL and/or non-transactional Cassandra data access logic as they look to migrate to YugabyteDB. +- YugabyteDB's API compatibility is not aimed at lift-and-shift porting of existing applications written for the original language. This is because existing applications are not written to take advantage of the distributed, strongly-consistent storage architecture that YugabyteDB provides. For such existing applications, developers should expect to modify their previously monolithic PostgreSQL and/or non-transactional Cassandra data access logic as they look to migrate to YugabyteDB. ## YSQL compatibility with PostgreSQL ### What is the extent of compatibility with PostgreSQL? -As highlighted in [Distributed PostgreSQL on a Google Spanner Architecture – Query Layer](https://blog.yugabyte.com/distributed-postgresql-on-a-google-spanner-architecture-query-layer/), YSQL reuses open source PostgreSQL’s query layer (written in C) as much as possible and as a result is wire-compatible with PostgreSQL dialect and client drivers. Specifically, YSQL v1.2 is based on PostgreSQL v11.2. Following are some of the currently supported features: +As highlighted in [Distributed PostgreSQL on a Google Spanner Architecture – Query Layer](https://blog.yugabyte.com/distributed-postgresql-on-a-google-spanner-architecture-query-layer/), YSQL reuses open source PostgreSQL’s query layer (written in C) as much as possible and as a result is wire-compatible with PostgreSQL dialect and client drivers. Specifically, YSQL is based on PostgreSQL v11.2. Following are some of the currently supported features: - DDL statements: CREATE, DROP and TRUNCATE tables - Data types: All primitive types including numeric types (integers and floats), text data types, byte arrays, date-time types, UUID, SERIAL, as well as JSONB diff --git a/docs/content/latest/faq/product.md b/docs/content/latest/faq/product.md index 52af14a994c7..cb491e163ecf 100644 --- a/docs/content/latest/faq/product.md +++ b/docs/content/latest/faq/product.md @@ -44,7 +44,7 @@ The next major release is the v2.1 release in Winter 2020. ## Can I deploy YugabyteDB to production? -Yes, both YugabyteDB APIs are production ready. [YCQL](https://blog.yugabyte.com/yugabyte-db-1-0-a-peek-under-the-hood/) achieved this status starting with v1.0 in May 2018. [YSQL](https://blog.yugabyte.com/announcing-yugabyte-db-2-0-ga:-jepsen-tested,-high-performance-distributed-sql/) achieved this status starting v2.0 in September 2019. +Yes, both YugabyteDB APIs are production ready. [YCQL](https://blog.yugabyte.com/yugabyte-db-1-0-a-peek-under-the-hood/) achieved this status starting with v1.0 in May 2018 while [YSQL](https://blog.yugabyte.com/announcing-yugabyte-db-2-0-ga:-jepsen-tested,-high-performance-distributed-sql/) became production ready starting v2.0 in September 2019. ## Which companies are currently using YugabyteDB in production? @@ -78,16 +78,102 @@ Details for both the above benchhmarks are published in [Building a Strongly Con Starting with [v1.3](https://blog.yugabyte.com/announcing-yugabyte-db-v1-3-with-enterprise-features-as-open-source/), YugabyteDB is 100% open source. It is licensed under Apache 2.0 and the source is available on [GitHub](https://github.com/yugabyte/yugabyte-db). -## How does YugabyteDB, Yugabyte Platform and Yugabyte Cloud differ from each other? +## How do YugabyteDB, Yugabyte Platform and Yugabyte Cloud differ from each other? -[YugabyteDB](../../quick-start/) is the best choice for the startup organizations with strong technical operations expertise looking to deploy YugabyteDB into production with traditional DevOps tools. +[YugabyteDB](../../quick-start/) is the 100% open source core database. It is the best choice for the startup organizations with strong technical operations expertise looking to deploy to production with traditional DevOps tools. -[Yugabyte Platform](../../deploy/enterprise-edition/) is commercial software for running a self-managed DB-as-a-Service. It has built-in cloud native operations, enterprise-grade deployment options and world-class support. It is the simplest way to run YugabyteDB in mission-critical production environments with one or more regions (across both public cloud and on-premise data centers). +[Yugabyte Platform](../../deploy/enterprise-edition/) is commercial software for running a self-managed YugabyteDB-as-a-Service. It has built-in cloud native operations, enterprise-grade deployment options and world-class support. It is the simplest way to run YugabyteDB in mission-critical production environments with one or more regions (across both public cloud and on-premise data centers). [Yugabyte Cloud](http://yugabyte.com/cloud) is Yugabyte's fully-managed cloud service on AWS and GCP. You can [sign up](https://www.yugabyte.com/cloud/) for early access now. A more detailed comparison of the above is available [here](https://www.yugabyte.com/platform/#compare-editions). +## What are the trade-offs involved in using YugabyteDB? + +Trade-offs depend on the type of database used as baseline for comparison. + +### Distributed SQL + +Examples: Amazon Aurora, Google Cloud Spanner, CockroachDB, TiDB + +**Benefits of YugabyteDB** + +- Low-latency reads and high-throughput writes. +- Cloud-neutral deployments with a Kubernetes-native database. +- 100% Apache 2.0 open source even for enterprise features. + +**Trade-offs** + +- None + +Learn more: [What is Distributed SQL?](https://blog.yugabyte.com/what-is-distributed-sql/) + +### Monolithic SQL + +Examples: PostgreSQL, MySQL, Oracle, Amazon Aurora. + +**Benefits of YugabyteDB** + +- Scale write throughput linearly across multiple nodes and/or geographic regions. +- Automatic failover and native repair. +- 100% Apache 2.0 open source even for enterprise features. + +**Trade-offs** + +- Transactions and JOINs can now span multiple nodes, thereby increasing latency. + +Learn more: [Distributed PostgreSQL on a Google Spanner Architecture – Query Layer](https://blog.yugabyte.com/distributed-postgresql-on-a-google-spanner-architecture-query-layer/) + +### Traditional NewSQL + +Examples: Vitess, Citus + +**Benefits of YugabyteDB** + +- Distributed transactions across any number of nodes. +- No single point of failure given all nodes are equal. +- 100% Apache 2.0 open source even for enterprise features. + +**Trade-offs** + +- None + +Learn more: [Rise of Globally Distributed SQL Databases – Redefining Transactional Stores for Cloud Native Era](https://blog.yugabyte.com/rise-of-globally-distributed-sql-databases-redefining-transactional-stores-for-cloud-native-era/) + +### Transactional NoSQL + +Examples: MongoDB, Amazon DynamoDB, FoundationDB, Azure Cosmos DB. + +**Benefits of YugabyteDB** + +- Flexibility of SQL as query needs change in response to business changes. +- Distributed transactions across any number of nodes. +- Low latency, strongly consistent reads given that read-time quorum is avoided altogether. +- 100% Apache 2.0 open source even for enterprise features. + +**Trade-offs** + +- None + +Learn more: [Why are NoSQL Databases Becoming Transactional?](https://blog.yugabyte.com/nosql-databases-becoming-transactional-mongodb-dynamodb-faunadb-cosmosdb/) + +### Eventually Consistent NoSQL + +Examples: Apache Cassandra, Couchbase. + +**Benefits of YugabyteDB** + +- Flexibility of SQL as query needs change in response to business changes. +- Strongly consistent, zero data loss writes. +- Strongly consistent as well as timeline-consistent reads without resorting to eventual consistency-related penalties such as read repairs and anti-entropy. +- 100% Apache 2.0 open source even for enterprise features. + +**Trade-offs** + +- Extremely short unavailability during the leader election time for all shard leaders lost during a node failure or network partition. + +Learn more: [Apache Cassandra: The Truth Behind Tunable Consistency, Lightweight Transactions & Secondary Indexes](https://blog.yugabyte.com/apache-cassandra-lightweight-transactions-secondary-indexes-tunable-consistency/) + ## How does YugabyteDB compare to other SQL and NoSQL databases? See [YugabyteDB in Comparison](../../comparisons/) diff --git a/docs/content/latest/introduction.md b/docs/content/latest/introduction.md index 843e6a44463e..9af140c217d4 100644 --- a/docs/content/latest/introduction.md +++ b/docs/content/latest/introduction.md @@ -95,6 +95,22 @@ The YugabyteDB APIs are isolated and independent from one another today. This me Trade-offs depend on the type of database used as baseline for comparison. +### Distributed SQL + +Examples: Amazon Aurora, Google Cloud Spanner, CockroachDB, TiDB + +**Benefits of YugabyteDB** + +- Low-latency reads and high-throughput writes. +- Cloud-neutral deployments with a Kubernetes-native database. +- 100% Apache 2.0 open source even for enterprise features. + +**Trade-offs** + +- None + +Learn more: [What is Distributed SQL?](https://blog.yugabyte.com/what-is-distributed-sql/) + ### Monolithic SQL Examples: PostgreSQL, MySQL, Oracle, Amazon Aurora. @@ -103,6 +119,7 @@ Examples: PostgreSQL, MySQL, Oracle, Amazon Aurora. - Scale write throughput linearly across multiple nodes and/or geographic regions. - Automatic failover and native repair. +- 100% Apache 2.0 open source even for enterprise features. **Trade-offs** @@ -118,6 +135,7 @@ Examples: Vitess, Citus - Distributed transactions across any number of nodes. - No single point of failure given all nodes are equal. +- 100% Apache 2.0 open source even for enterprise features. **Trade-offs** @@ -134,6 +152,7 @@ Examples: MongoDB, Amazon DynamoDB, FoundationDB, Azure Cosmos DB. - Flexibility of SQL as query needs change in response to business changes. - Distributed transactions across any number of nodes. - Low latency, strongly consistent reads given that read-time quorum is avoided altogether. +- 100% Apache 2.0 open source even for enterprise features. **Trade-offs** @@ -150,6 +169,7 @@ Examples: Apache Cassandra, Couchbase. - Flexibility of SQL as query needs change in response to business changes. - Strongly consistent, zero data loss writes. - Strongly consistent as well as timeline-consistent reads without resorting to eventual consistency-related penalties such as read repairs and anti-entropy. +- 100% Apache 2.0 open source even for enterprise features. **Trade-offs** diff --git a/docs/content/latest/quick-start/kubernetes/create-local-cluster.md b/docs/content/latest/quick-start/kubernetes/create-local-cluster.md index c875ebd8820c..ff15dc11fca4 100644 --- a/docs/content/latest/quick-start/kubernetes/create-local-cluster.md +++ b/docs/content/latest/quick-start/kubernetes/create-local-cluster.md @@ -80,6 +80,6 @@ The **Masters** section highlights the YB-Master service along its corresponding ### 4.2 TServer status -Click **See all nodes** to go to the **Tablet Servers** page where we can observe the one YB-TServer along with the time since it last connected to the YB-Master using regular heartbeats. Additionally, you can see that the **Load (Num Tablets)** is balanced across all available YB-TServer (tserver) services. These tablets are the shards of the user tables currently managed by the cluster (which in this case is the `system_redis.redis` table). As new tables get added, new tablets will get automatically created and distributed evenly across all the available YB-TServer services. +Click **See all nodes** to go to the **Tablet Servers** page where we can observe the one YB-TServer along with the time since it last connected to the YB-Master using regular heartbeats. Additionally, you can see that the **Load (Num Tablets)** is balanced across all available YB-TServers. These tablets are the shards of the user tables currently managed by the cluster (which in this case is the `system_redis.redis` table). As new tables get added, new tablets will get automatically created and distributed evenly across all the available YB-TServers. ![tserver-list](/images/admin/master-tservers-list-kubernetes-rf1.png) diff --git a/docs/content/latest/reference/configuration/yb-master.md b/docs/content/latest/reference/configuration/yb-master.md index 448e5186ce04..f2e4018d9d03 100644 --- a/docs/content/latest/reference/configuration/yb-master.md +++ b/docs/content/latest/reference/configuration/yb-master.md @@ -13,7 +13,7 @@ isTocNested: 3 showAsideToc: true --- -Use the `yb-master` binary and its options to configure the [YB-Master](../../../architecture/concepts/yb-master) service. The `yb-master` executable file is located in the `bin` directory of YugabyteDB home. +Use the `yb-master` binary and its options to configure the [YB-Master](../../../architecture/concepts/yb-master) server. The `yb-master` executable file is located in the `bin` directory of YugabyteDB home. ## Syntax @@ -67,7 +67,7 @@ Specifies a comma-separated list of all RPC addresses for `yb-master` consensus- {{< note title="Note" >}} -The number of comma-separated values should match the total number of YB-Master service (or the replication factor). +The number of comma-separated values should match the total number of YB-Master server (or the replication factor). {{< /note >}} @@ -227,7 +227,7 @@ Default: Server automatically picks a valid default internally, typically 8. #### --max_clock_skew_usec -The expected maximum clock skew, in microseconds (µs), between any two services in your deployment. +The expected maximum clock skew, in microseconds (µs), between any two servers in your deployment. Default: `50000` (50,000 µs = 50ms) @@ -247,7 +247,7 @@ Settings related to managing geo-distributed clusters and Raft consensus. The maximum heartbeat periods that the leader can fail to heartbeat in before the leader is considered to be failed. The total failure timeout, in milliseconds, is [`--raft_heartbeat_interval_ms`](#raft-heartbeat-interval-ms) multiplied by `--leader_failure_max_missed_heartbeat_periods`. -For read replica clusters, set the value to `10` on both YB-Master and YB-TServer services. Because the the data is globally replicated, RPC latencies are higher. Use this flag to increase the failure detection interval in such a higher RPC latency deployment. +For read replica clusters, set the value to `10` on both YB-Master and YB-TServer servers. Because the the data is globally replicated, RPC latencies are higher. Use this flag to increase the failure detection interval in such a higher RPC latency deployment. Default: `6` @@ -307,7 +307,7 @@ Default: `false` #### --use_node_to_node_encryption -Enable server-server, or node-to-node, encryption between YugabyteDB YB-Master and YB-TServer services in a cluster or universe. To work properly, all YB-Master services must also have their [`--use_node_to_node_encryption`](../yb-master/#use-node-to-node-encryption) setting enabled. When enabled, then [`--allow_insecure_connections`](#allow-insecure-connections) must be disabled. +Enable server-server, or node-to-node, encryption between YugabyteDB YB-Master and YB-TServer servers in a cluster or universe. To work properly, all YB-Master servers must also have their [`--use_node_to_node_encryption`](../yb-master/#use-node-to-node-encryption) setting enabled. When enabled, then [`--allow_insecure_connections`](#allow-insecure-connections) must be disabled. Default: `false` @@ -337,7 +337,7 @@ The Admin UI for yb-master is available at http://localhost:7000. ### Home -Home page of the YB-Master service that gives a high level overview of the cluster. Note all YB-Master services in a cluster show identical information. +Home page of the YB-Master server that gives a high level overview of the cluster. Note all YB-Master servers in a cluster show identical information. ![master-home](/images/admin/master-home-binary-with-tables.png) @@ -349,7 +349,7 @@ List of tables present in the cluster. ### Tablet servers -List of all nodes (aka YB-TServer services) present in the cluster. +List of all nodes (aka YB-TServer servers) present in the cluster. ![master-tservers](/images/admin/master-tservers-list-binary-with-tablets.png) diff --git a/docs/content/latest/reference/configuration/yb-tserver.md b/docs/content/latest/reference/configuration/yb-tserver.md index c77a69aed269..72b1121246ee 100644 --- a/docs/content/latest/reference/configuration/yb-tserver.md +++ b/docs/content/latest/reference/configuration/yb-tserver.md @@ -13,7 +13,7 @@ isTocNested: 3 showAsideToc: true --- -Use the `yb-tserver` binary and its options to configure the [YB-TServer](../../../architecture/concepts/yb-tserver/) service. The `yb-tserver` executable file is located in the `bin` directory of YugabyteDB home. +Use the `yb-tserver` binary and its options to configure the [YB-TServer](../../../architecture/concepts/yb-tserver/) server. The `yb-tserver` executable file is located in the `bin` directory of YugabyteDB home. ## Syntax @@ -83,7 +83,7 @@ Comma-separated list of all the `yb-master` RPC addresses. Mandatory. {{< note title="Note" >}} -The number of comma-separated values should match the total number of YB-Master services (or the replication factor). +The number of comma-separated values should match the total number of YB-Master servers (or the replication factor). {{< /note >}} @@ -197,7 +197,7 @@ Settings related to managing geo-distributed clusters and Raft consensus. The maximum heartbeat periods that the leader can fail to heartbeat in before the leader is considered to be failed. The total failure timeout, in milliseconds (ms), is [`--raft_heartbeat_interval_ms`](#raft-heartbeat-interval-ms) multiplied by `--leader_failure_max_missed_heartbeat_periods`. -For read replica clusters, set the value to `10` on both YB-Master and YB-TServer services. Because the the data is globally replicated, RPC latencies are higher. Use this flag to increase the failure detection interval in such a higher RPC latency deployment. +For read replica clusters, set the value to `10` on both YB-Master and YB-TServer servers. Because the the data is globally replicated, RPC latencies are higher. Use this flag to increase the failure detection interval in such a higher RPC latency deployment. Default: `6` @@ -463,7 +463,7 @@ Default: `false` #### --use_node_to_node_encryption -Enable server-server, or node-to-node, encryption between YugabyteDB YB-Master and YB-TServer services in a cluster or universe. To work properly, all YB-Master services must also have their [`--use_node_to_node_encryption`](../yb-master/#use-node-to-node-encryption) setting enabled. When enabled, then [`--allow_insecure_connections`](#allow-insecure-connections) must be disabled. +Enable server-server, or node-to-node, encryption between YugabyteDB YB-Master and YB-TServer servers in a cluster or universe. To work properly, all YB-Master servers must also have their [`--use_node_to_node_encryption`](../yb-master/#use-node-to-node-encryption) setting enabled. When enabled, then [`--allow_insecure_connections`](#allow-insecure-connections) must be disabled. Default: `false` diff --git a/docs/content/latest/secure/tls-encryption/server-to-server.md b/docs/content/latest/secure/tls-encryption/server-to-server.md index b6e3f9ad5b64..c5b4abddbc5e 100644 --- a/docs/content/latest/secure/tls-encryption/server-to-server.md +++ b/docs/content/latest/secure/tls-encryption/server-to-server.md @@ -15,7 +15,7 @@ isTocNested: true showAsideToc: true --- -To enable server-server (or node-to-node) encryption, start the YB-Master and YB-TServer services using the appropriate configuration options described here. +To enable server-server (or node-to-node) encryption, start the YB-Master and YB-TServer servers using the appropriate configuration options described here. Configuration option | Service | Description | -------------------------------|--------------------------|------------------------------| @@ -23,7 +23,7 @@ Configuration option | Service | Description `allow_insecure_connections` | YB-Master only | Optional, defaults to `true`. Set to `false` to disallow any process with unencrypted communication from joining this cluster. Default value is `true`. Note that this flag requires the `use_node_to_node_encryption` to be enabled. | `certs_dir` | YB-Master, YB-TServer | Optional. This directory should contain the configuration that was prepared in the a step for this node to perform encrypted communication with the other nodes. Default value for YB-Masters is `/yb-data/master/data/certs` and for YB-TServers this location is `/yb-data/tserver/data/certs` | -## Start the master process +## Start the YB-Master server You can enable access control by starting the `yb-master` processes minimally with the `--use_node_to_node_encryption=true` configuration option as described above. Your command should look similar to that shown below: @@ -38,9 +38,9 @@ bin/yb-master \ You can read more about bringing up the YB-Masters for a deployment in the section on [manual deployment of a YugabyteDB cluster](../../../deploy/manual-deployment/start-masters/). -## Start the YB-TServer service +## Start the YB-TServer server -You can enable access control by starting the `yb-tserver` service minimally with the `--use_node_to_node_encryption=true` flag as described above. Your command should look similar to that shown below: +You can enable access control by starting the `yb-tserver` server minimally with the `--use_node_to_node_encryption=true` flag as described above. Your command should look similar to that shown below: ``` bin/yb-tserver \ diff --git a/docs/content/latest/troubleshoot/nodes/check-logs.md b/docs/content/latest/troubleshoot/nodes/check-logs.md index ce819d0bfb3e..fbb86b241419 100644 --- a/docs/content/latest/troubleshoot/nodes/check-logs.md +++ b/docs/content/latest/troubleshoot/nodes/check-logs.md @@ -23,8 +23,7 @@ In the sections below, the YugabyteDB `yugabyte-data` directory is represented b ## YB-Master logs -YB-Master services manage system meta-data, such as namespaces (databases or keyspaces), tables, and types: they handle DDL statements (for example, `CREATE TABLE`, `DROP TABLE`, `ALTER TABLE` KEYSPACE/TYPE`). YB-Master services also manage users, permissions, and coordinate background operations, such as load balancing. -Master logs can be found at: +The YB-Master service manages system metadata, such as namespaces (databases or keyspaces) and tables. It also handles DDL statements such as `CREATE TABLE`, `DROP TABLE`, `ALTER TABLE` / `KEYSPACE/TYPE`. It also manages users, permissions, and coordinate background operations, such as load balancing. Its logs can be found at: ```sh $ cd /disk1/yb-data/master/logs/ @@ -34,8 +33,7 @@ Logs are organized by error severity: `FATAL`, `ERROR`, `WARNING`, `INFO`. In ca ## YB-TServer logs -YB-TServer services perform the actual I/O for end-user requests: they handle DML statements (for example, `INSERT`, `UPDATE`, `DELETE`, and `SELECT`) and Redis commands. -YB-TServer logs can be found at: +The YB-TServer service performs the actual I/O for end-user requests. It handles DML statements such as `INSERT`, `UPDATE`, `DELETE`, and `SELECT`. Its logs can be found at: ```sh $ cd /disk1/yb-data/tserver/logs/ diff --git a/docs/layouts/partials/footer.html b/docs/layouts/partials/footer.html index f6b31a5c6bb9..63f3ce0e4669 100644 --- a/docs/layouts/partials/footer.html +++ b/docs/layouts/partials/footer.html @@ -37,7 +37,7 @@ Privacy Policy -->
diff --git a/docs/layouts/partials/footer_content.html b/docs/layouts/partials/footer_content.html index c41f0ce99955..50266b71b6de 100644 --- a/docs/layouts/partials/footer_content.html +++ b/docs/layouts/partials/footer_content.html @@ -9,7 +9,7 @@