847850277 commented on issue #3801:
URL: https://github.com/apache/shenyu/issues/3801#issuecomment-1207155203

   @yu199195  I've already sent it. It seems that the other party hasn't 
received it. so i comment on this issues.
   
   ## background
   In some scenarios, the storage method of the log system may be the ES 
solution, which can also solve most problems. But in some scenarios, it also 
has its shortcomings. For example, to count some data with a long time span, 
there are enough data in the ES index. It takes some time to match them. At the 
same time, with the expansion of the system scale, the access volume of the log 
system has increased. If es is used, its maintenance cost and learning cost 
will also be large. Under the log system, for the above scenario, Clickhouse is 
another storage scheme of the log system.
   In some enterprises, such as BiliBili and Ctrip, there are also many 
practices of Clickhouse in the log system.
   Therefore, if someone uses Shenyu gateway and also wants to use Clickhouse 
as the database of the logging system, we can provide Shenyu's 
LoggingClickHousePlugin support.
   
   ## functional design
   - The following figure
   
![clickhouseplugin](https://user-images.githubusercontent.com/12622645/183236249-4cdefb5b-2b23-40eb-a2be-73e7fdc23058.png)
   
   - 1 LoggingClickHousePlugin extends AbstractLoggingPlugin 
,AbstractLoggingPlugin extends AbstractShenyuPlugin.
       LoggingClickHousePlugin#doLogExecute() method can get data about Request 
and Response.
   - 2 ClickHouseLogCollector extends AbstractLogCollector
       ClickHouseLogCollector#collect() method can collect log datas
   - 3 ClickHouseLogCollectClient implements LogConsumeClient interface
       ClickHouseLogCollectClient#consume() method can save data to clickhouse 
database
   
   
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to