Skip to content

Add master/data/query server concepts to docs/packaging#6916

Merged
gianm merged 7 commits intoapache:masterfrom
jon-wei:server_type_docs
Jan 31, 2019
Merged

Add master/data/query server concepts to docs/packaging#6916
gianm merged 7 commits intoapache:masterfrom
jon-wei:server_type_docs

Conversation

@jon-wei
Copy link
Copy Markdown
Contributor

@jon-wei jon-wei commented Jan 25, 2019

This is a PR for the changes described in proposal #6838.

Areas changed:

  • New architecture diagram in design/index.md
  • Adds Master/Data/Query server type concepts to design/index.md
  • Changed process-specific config and API docs to be subsections under Master/Data/Query groupings
  • Adjusted "clustering" doc to use server types
  • Structured the conf and quickstart/tutorial configurations to have master/data/query directories
  • Added page on process colocation

@fjy fjy added this to the 0.14.0 milestone Jan 25, 2019
Copy link
Copy Markdown
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment on "docs/img/druid-architecture.png": try boxes instead of cylinders, since cylinders in architecture diagrams are typically used for databases, which these processes are not. (Until you combine them Voltron style)

On the directory layout changes (conf/historical -> conf/data/historical):

  • I think node.sh would need changes to work with the new structure.
  • The supervise program or its conf files would need changes too.
  • I'm wondering if it'd be best to revert the layout to the old structure (e.g. conf/historical). Colocation of processes into master/query/data servers is a suggested simplification but is not required, and the colocated configs would look weird if the processes are not actually colocated. And the necessary changes to scripts like supervise and node.sh mean the upgrade path would be somewhat bumpy.

There were a few places I commented about capitalizing server and process names. I don't think I caught them all, so if you see any others I didn't catch please adjust those too.

~ under the License.
-->

# Process Colocation
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, it'd be better to remove this doc and either incorporate its contents into design/index.md or to shorten what's in design/index.md and break out most of the content from the "Server Types" section into a new doc (maybe design/processes.md), and incorporate this content into that new page. The rationale for this suggestion is that it would be easier for users to grasp the concepts around server and process types if a single page spelled out all the info they need.

There's enough stuff here that probably the second makes sense: shortening what's in design/index.md and creating a design/processes.md that discusses server types and processes in more detail.

Copy link
Copy Markdown
Contributor Author

@jon-wei jon-wei Jan 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I restructured this to go with the second suggestion, the new page is at design/processes.md


With higher levels of ingestion or query load, it can make sense to deploy the Historical and MiddleManager processes on separate nodes to to avoid CPU and memory contention.

The historical also benefits from having free memory for memory mapped segments, which can be another reason to deploy the Data Server processes separately. No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO clearer to replace "the Data Server processes" with "the Historical and MiddleManager processes".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced this with specific process references

Comment thread docs/content/tutorials/cluster.md Outdated

This simple cluster will feature:
- Scalable, fault-tolerant Data servers running Historical and MiddleManager processes
- Query servers, hosting Druid broker processes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize Broker.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalized

configuration as well.
your needs.

This simple cluster will feature:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider reordering these to be in the same order as the sections below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reordered

Comment thread docs/content/configuration/index.md Outdated
## MiddleManager and Peons
## Data Server

This section contains the configuration options for the processes that reside on data servers (middle managers/peons and historicals).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggested style adjustments and clarifications:

This section contains the configuration options for the processes that reside on Data servers (MiddleManagers and Historicals) in the suggested [three-server configuration](../design/index.html#server-types).

I'd suggest similar changes for the Master and Query sections in this doc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added suggested clarification

Comment thread docs/content/design/index.md Outdated

A master server manages data ingestion and storage: it is responsible for starting new ingestion jobs and coordinating availability of data on the "Data servers" described below.

Within a master server, functionality is split between two processes, the coordinator and overlord.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize Coordinator and Overlord.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalized

Comment thread docs/content/design/index.md Outdated
## Server Types

* [**Historical**](../design/historical.html) processes are the workhorses that handle storage and querying on "historical" data
A Druid cluster is organized into 3 server types:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule to follow with intro docs should be: guide people down a simple/recommended path, but don't mislead. "Druid cluster is organized into 3 server types" is somewhat misleading, consider this or similar instead:

Druid processes can be deployed any way you like, but for ease of deployment we suggest organizing them into three server types: Master, Query, and Data.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded as suggested

Comment thread docs/content/design/index.md Outdated

A data server executes ingestion jobs and stores queryable data.

Within a data server, functionality is split between two processes, the historical and middle manager.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize Data, Historical, and MiddleManager.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalized

Comment thread docs/content/design/index.md Outdated
In addition to these process types, Druid also has three external dependencies. These are intended to be able to
### External dependencies

In addition to these server and process types, Druid also has three external dependencies. These are intended to be able to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to its built-in process types

Might be more clear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded as suggested

## MiddleManager
## Data Server

This section documents the API endpoints for the processes that reside on data servers (middle managers/peons and historicals).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggested style adjustments and clarifications:

This section contains the API endpoints for the processes that reside on Data servers (MiddleManagers and Historicals) in the suggested [three-server configuration](../design/index.html#server-types).

I'd suggest similar changes for the Master and Query sections in this doc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added suggested clarification

@jon-wei
Copy link
Copy Markdown
Contributor Author

jon-wei commented Jan 29, 2019

@gianm

I addressed the line comments, updated the diagram to use boxes instead of cylinders, and did a pass through the docs to capitalize the Druid process names in all areas.

I reverted the conf directory changes.

I also went ahead and removed the "Indexing Service" concept from the TOC and elsewhere in the docs and replaced with references to Overlord or Overlord/MiddleManager directly, I felt it was too much to have another high-level process organization.

### Data distribution model

Druid’s data distribution is segment-based and leverages a highly available "deep" storage such as S3 or HDFS. Scaling up (or down) does not require massive copy actions or downtime; in fact, losing any number of historical nodes does not result in data loss because new historical nodes can always be brought up by reading data from "deep" storage.
Druid’s data distribution is segment-based and leverages a highly available "deep" storage such as S3 or HDFS. Scaling up (or down) does not require massive copy actions or downtime; in fact, losing any number of Historical nodes does not result in data loss because new Historical nodes can always be brought up by reading data from "deep" storage.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gianm @jon-wei what do you think of universally replacing "node" with "process" everywhere?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would help but would rather do it in a different PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sounds good to me, but I'll do that in a later patch to keep this PR scoped down

|--------|-----------|-------|
|`druid.processing.buffer.sizeBytes`|This specifies a buffer size for the storage of intermediate results. The computation engine in both the Historical and Realtime nodes will use a scratch buffer of this size to do all of their intermediate computations off-heap. Larger values allow for more aggregations in a single pass over the data while smaller values can require more passes depending on the query that is being executed.|auto (max 1GB)|
|`druid.processing.formatString`|Realtime and historical nodes use this format string to name their processing threads.|processing-%s|
|`druid.processing.formatString`|Realtime and Historical nodes use this format string to name their processing threads.|processing-%s|
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we not deprecated real-time processes yet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They've been deprecated but not removed from the docs yet

`index_storage` and `descriptor_storage`. Underneath the hood, the Cassandra integration leverages Astyanax. The
index storage table is a [Chunked Object](https://github.com/Netflix/astyanax/wiki/Chunked-Object-Store) repository. It contains
compressed segments for distribution to historical nodes. Since segments can be large, the Chunked Object storage allows the integration to multi-thread
compressed segments for distribution to Historical nodes. Since segments can be large, the Chunked Object storage allows the integration to multi-thread
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should delete this page. I'm pretty sure C* doesn't even work as a deep storage.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO if we're going to delete this page we should delete the extension too. So it's not relevant to this patch.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay - we can do this as part of a later update.

Comment thread docs/content/design/processes.md Outdated
* [Coordinator](../design/coordinator.html)
* [Overlord](../design/overlord.html)
* [Broker](../design/broker.html)
* [Router (Optional)](../development/router.html)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional processes should be at the end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I can understand why the order is what it is

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved Router to the end

@fjy
Copy link
Copy Markdown
Contributor

fjy commented Jan 30, 2019

👍

Copy link
Copy Markdown
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great so far!! Just a couple of line comments. In addition to those, in the conf files, you spelled "coordinator" wrong (as "coordiator").

Comment thread docs/content/configuration/index.md Outdated

conf/druid:
_common broker coordinator historical middleManager overlord
_common data master query
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you meant to revert the conf/data/historical sort of changes, please revert this part too.

Copy link
Copy Markdown
Contributor Author

@jon-wei jon-wei Jan 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks, reverted this and fixed the "coordiator" path

Comment thread docs/content/design/processes.md Outdated

[**Peon**](../design/peons.html) processes are task execution engines spawned by MiddleManagers. Each Peon runs a separate JVM and is responsible for executing a single task. Peons always run on the same host as the MiddleManager that spawned them.

## Process Colocation
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title here is counter-intuitive: it's mostly talking about when you would not want to colocate. (The previous section is detailing the case for colocation.) How about re-titling it to "Pros and cons of colocation".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to "Pros and cons of colocation"

Copy link
Copy Markdown
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gianm gianm merged commit 8213787 into apache:master Jan 31, 2019
justinborromeo pushed a commit to justinborromeo/incubator-druid that referenced this pull request Feb 2, 2019
* Add master/data/query server concepts to docs/packaging

* PR comments

* TOC and markdown fix

* Update image legend

* PR comment

* More PR comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants