Merge pull request #31 from cwiki-us-docs/feature/cluster

集群部署方式进行部署
This commit is contained in:
YuCheng Hu 2021-08-03 14:15:40 -04:00 committed by GitHub
commit 3e3702e68e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 102 deletions

View File

@ -1,13 +0,0 @@
<!-- toc -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-8828078415045620"
data-ad-slot="7586680510"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

View File

@ -1,76 +1,52 @@
---
id: cluster
title: "Clustered deployment"
---
# 集群方式部署
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
Apache Druid 被设计部署为可扩展和容错的集群部署方式。
在本文档中,我们将会设置一个示例集群,并且进行一些讨论,你可以进行那些修改来满足你的需求。
Apache Druid is designed to be deployed as a scalable, fault-tolerant cluster.
这个简单的集群包括有下面的特性:
In this document, we'll set up a simple cluster and discuss how it can be further configured to meet
your needs.
- 主服务器Master Server将会运行 Coordinator 和 Overlord 进程
- 2 个可扩展和容错的数据服务器将会运行 Historical 和 MiddleManager 进程
- 一个查询服务器Query Server将会运行 Broker 和 Router 进程
This simple cluster will feature:
在生产环境中,我们建议你部署多个 Master 服务器和多个 Query 服务器服务器的高可用性fault-tolerant配置与你的数据特性和容错性要求息息相关。
但是你可以使用一个主服务器Master Server 和 一个查询服务器Query Server来启动服务随着需求的增加你可以随时增加更多的服务器节点。
- A Master server to host the Coordinator and Overlord processes
- Two scalable, fault-tolerant Data servers running Historical and MiddleManager processes
- A query server, hosting the Druid Broker and Router processes
## 选择硬件
In production, we recommend deploying multiple Master servers and multiple Query servers in a fault-tolerant configuration based on your specific fault-tolerance needs, but you can get started quickly with one Master and one Query server and add more servers later.
### 全新部署
## Select hardware
如果你没有已经存在的 Druid 集群,但是你希望开始在你的环境中使用集群方式部署 Druid本文档将会使用预配置pre-made configurations内容来帮助你开始部署 Druid 的集群。
### Fresh Deployment
#### 主服务器Master Server
If you do not have an existing Druid cluster, and wish to start running Druid in a clustered deployment, this guide provides an example clustered deployment with pre-made configurations.
Coordinator 和 Overlord 进程将会负责处理 metadata 数据和在你集群中进行协调。这 2 个进程可以合并在同一个服务器上。
#### Master server
在本示例中,我们将会在 AWS [m5.2xlarge](https://aws.amazon.com/ec2/instance-types/m5/) 部署一个评估的服务器和实例。
The Coordinator and Overlord processes are responsible for handling the metadata and coordination needs of your cluster. They can be colocated together on the same server.
In this example, we will be deploying the equivalent of one AWS [m5.2xlarge](https://aws.amazon.com/ec2/instance-types/m5/) instance.
This hardware offers:
AWS 上面硬件的配置为:
- 8 vCPUs
- 31 GB RAM
Example Master server configurations that have been sized for this hardware can be found under `conf/druid/cluster/master`.
有关本服务器的配置信息和有关硬件大小的建议,可以在文件 `conf/druid/cluster/master` 中找到。
#### Data server
#### 数据服务器(Data server
Historicals and MiddleManagers can be colocated on the same server to handle the actual data in your cluster. These servers benefit greatly from CPU, RAM,
and SSDs.
Historicals 和 MiddleManagers 可以合并到同一个服务器上,这个 2 个进程在你的集群中用于处理实际的数据。通常来说越大更大的 CPU, RAM, SSDs硬盘越好更好。
In this example, we will be deploying the equivalent of two AWS [i3.4xlarge](https://aws.amazon.com/ec2/instance-types/i3/) instances.
在本示例中,我们将会在 [i3.4xlarge](https://aws.amazon.com/ec2/instance-types/i3/) 部署一个评估的服务器和实例。
This hardware offers:
AWS 上面硬件的配置为:
- 16 vCPUs
- 122 GB RAM
- 2 * 1.9TB SSD storage
Example Data server configurations that have been sized for this hardware can be found under `conf/druid/cluster/data`.
有关本服务器的配置信息和有关硬件大小的建议,可以在文件 `conf/druid/cluster/data` 中找到。
#### Query server
#### 查询服务器(Query server
Druid Brokers accept queries and farm them out to the rest of the cluster. They also optionally maintain an
in-memory query cache. These servers benefit greatly from CPU and RAM.
@ -473,48 +449,7 @@ You can add more Query servers as needed based on query load. If you increase th
Congratulations, you now have a Druid cluster! The next step is to learn about recommended ways to load data into
Druid based on your use case. Read more about [loading data](../ingestion/index.md).
## 集群部署
Apache Druid旨在作为可伸缩的容错集群进行部署。
在本文档中,我们将安装一个简单的集群,并讨论如何对其进行进一步配置以满足您的需求。
这个简单的集群将具有以下特点:
* 一个Master服务同时起Coordinator和Overlord进程
* 两个可伸缩、容错的Data服务来运行Historical和MiddleManager进程
* 一个Query服务运行Druid Broker和Router进程
在生产中我们建议根据您的特定容错需求部署多个Master服务器和多个Query服务器但是您可以使用一台Master服务器和一台Query服务器将服务快速运行起来然后再添加更多服务器。
### 选择硬件
#### 首次部署
如果您现在没有Druid集群并打算首次以集群模式部署运行Druid则本指南提供了一个包含预先配置的集群部署示例。
##### Master服务
Coordinator进程和Overlord进程负责处理集群的元数据和协调需求它们可以运行在同一台服务器上。
在本示例中我们将在等效于AWS[m5.2xlarge](https://aws.amazon.com/ec2/instance-types/m5/)实例的硬件环境上部署。
硬件规格为:
* 8核CPU
* 31GB内存
可以在`conf/druid/cluster/master`下找到适用于此硬件规格的Master示例服务配置。
##### Data服务
Historical和MiddleManager可以分配在同一台服务器上运行以处理集群中的实际数据这两个服务受益于CPU、内存和固态硬盘。
在本示例中我们将在等效于AWS[i3.4xlarge](https://aws.amazon.com/cn/ec2/instance-types/i3/)实例的硬件环境上部署。
硬件规格为:
* 16核CPU
* 122GB内存
* 2 * 1.9TB 固态硬盘
可以在`conf/druid/cluster/data`下找到适用于此硬件规格的Data示例服务配置。
##### Query服务

View File

@ -130,7 +130,7 @@ dsql>
{"timestamp":"2018-01-01T01:01:59Z","srcIP":"1.1.1.1", "dstIP":"2.2.2.2","packets":11,"bytes":5780}
```
上面的 3 原始数据使用 "rolled up" 后将会合并成下面 1 条数据进行导入:
上面的 3 原始数据使用 "rolled up" 后将会合并成下面 1 条数据进行导入:
```bash
┌──────────────────────────┬────────┬───────┬─────────┬─────────┬─────────┐