druid/docs/content/Realtime.md

56 lines
2.5 KiB
Markdown
Raw Normal View History

---
2013-09-26 19:22:28 -04:00
layout: doc_page
---
2014-02-07 14:35:44 -05:00
Real-time Node
==============
For Real-time Node Configuration, see [Realtime Configuration](Realtime-Config.html).
2013-09-13 18:20:39 -04:00
2014-02-07 14:35:44 -05:00
For Real-time Ingestion, see [Realtime Ingestion](Realtime-ingestion.html).
2014-12-09 17:28:15 -05:00
Realtime nodes provide a realtime index. Data indexed via these nodes is immediately available for querying. Realtime nodes will periodically build segments representing the data theyve collected over some span of time and transfer these segments off to [Historical](Historical.html) nodes. They use ZooKeeper to monitor the transfer and the metadata storage to store metadata about the transferred segment. Once transfered, segments are forgotten by the Realtime nodes.
2013-09-13 18:20:39 -04:00
2014-02-07 14:35:44 -05:00
### Running
2013-09-13 18:20:39 -04:00
```
io.druid.cli.Main server realtime
```
2014-02-07 14:35:44 -05:00
Segment Propagation
-------------------
2013-09-13 18:20:39 -04:00
2014-02-07 14:35:44 -05:00
The segment propagation diagram for real-time data ingestion can be seen below:
2014-02-07 14:35:44 -05:00
![Segment Propagation](../img/segmentPropagation.png "Segment Propagation")
2013-11-18 19:20:25 -05:00
2015-03-31 00:59:15 -04:00
You can read about the various components shown in this diagram under the Architecture section (see the menu on the right). Note that some of the names are now outdated.
2013-11-18 19:20:25 -05:00
2014-02-07 14:35:44 -05:00
### Firehose
2014-02-07 14:35:44 -05:00
See [Firehose](Firehose.html).
2014-02-07 14:35:44 -05:00
### Plumber
2014-02-07 14:35:44 -05:00
See [Plumber](Plumber.html)
2014-02-07 14:35:44 -05:00
Extending the code
------------------
2014-02-07 14:35:44 -05:00
Realtime integration is intended to be extended in two ways:
2013-09-13 18:20:39 -04:00
2014-02-07 14:35:44 -05:00
1. Connect to data streams from varied systems ([Firehose](https://github.com/druid-io/druid-api/blob/master/src/main/java/io/druid/data/input/FirehoseFactory.java))
2014-12-23 14:26:52 -05:00
2. Adjust the publishing strategy to match your needs ([Plumber](https://github.com/druid-io/druid/blob/master/server/src/main/java/io/druid/segment/realtime/plumber/PlumberSchool.java))
2014-02-07 14:35:44 -05:00
The expectations are that the former will be very common and something that users of Druid will do on a fairly regular basis. Most users will probably never have to deal with the latter form of customization. Indeed, we hope that all potential use cases can be packaged up as part of Druid proper without requiring proprietary customization.
2013-09-13 18:20:39 -04:00
2014-02-07 14:35:44 -05:00
Given those expectations, adding a firehose is straightforward and completely encapsulated inside of the interface. Adding a plumber is more involved and requires understanding of how the system works to get right, its not impossible, but its not intended that individuals new to Druid will be able to do it immediately.
2015-02-11 19:12:51 -05:00
HTTP Endpoints
--------------
The real-time node exposes several HTTP endpoints for interactions.
### GET
* `/status`
Returns the Druid version, loaded extensions, memory used, total memory and other useful information about the node.