Log Service allows you to replicate data from a source Logstore and distribute the data to multiple destination Logstores. Before you can replicate and distribute the data, you must create a data transformation rule for the source Logstore. This topic describes how to replicate data from a source Logstore and distribute the data to multiple destination Logstores in a typical use scenario.
Use scenario
A data analytics company wants to replicate all log entries from a source Logstore and distribute the log entries to two destination Logstores. The replication and distribution features of Log Service allow the company to use the e_set function to specify tags, use the e_split function to categorize the log entries based on the tags that you specify, and then use the e_output function to distribute each category of log entries to the destination Logstore that matches the tag for the category. The following figure shows the basic logic of the replication and distribution features. Before you begin, make sure that the following operations are complete:- Evaluate the performance of the two destination projects, target-a and target-b. For example, evaluate the number of shards in each of these Logstores. For more information, see Performance guide.
- Create two projects, target-a and target-b. Then, create two Logstores, logstore-a and logstore-b. For more information, see Manage a project and Manage a Logstore.
Procedure
Result
- Open the target-a project. On the Logstores tab of the page, select the logstore-a Logstore. Then, you can view the log entries that are distributed to the logstore-a Logstore.
- Open the target-b project. On the Logstores tab of the page, select the logstore-b Logstore. Then, you can view the log entries that are distributed to the logstore-b Logstore.