Scaling request logging with ClickHouse, Kafka, and Vector
1–10 of 29 posts
Re: Scaling request logging with ClickHouse, Kafka, and Vector
#2I had a similar project back in August when I realised my DB's performance (Postgres) was blocking me from implementing features users commonly ask for (querying out to 30 days of historical uptime data).
I was already blown away at the performance (200ms to query what Postgres was doing in 500-600ms), but then I realized I hadn't put an index on the Clickhouse table. Now the query returns in 50-70ms, and that includes network time.
Re: Scaling request logging with ClickHouse, Kafka, and Vector
#3Alternatively, you could've used async insert functionality built into ClickHouse: https://clickhouse.com/docs/optimize/asynchronous-inserts . All of these solutions are operationally simpler than Kafka + Vector, although obviously it's all tradeoffs.
Re: Scaling request logging with ClickHouse, Kafka, and Vector
#4BTW you could've used e.g. kittenhouse ( https://github.com/YuriyNasretdinov/kittenhouse , my fork) or just a simpler buffer table, with 2 layers and a larger aggregation period than in the example. Alternatively, you could've used async insert functionality built into ClickHouse: https://clickhouse.com/docs/optimize/asynchronous-inserts . All of these solutions are operationally simpler than Kafka + Vector, although…
But I imagine the writeup eschews myriad future concerns and does not entirely illustrate the pressure and stress of trying to solve such a high-scale problem.
Ultimately, going with a somewhat more complex solution that involves additional architecture but has been tried and tested by a 3rd party that you trust can sometimes be the more fitting end result. Assurance often weighs more than simplicity, I think.
Re: Scaling request logging with ClickHouse, Kafka, and Vector
#5BTW you could've used e.g. kittenhouse ( https://github.com/YuriyNasretdinov/kittenhouse , my fork) or just a simpler buffer table, with 2 layers and a larger aggregation period than in the example. Alternatively, you could've used async insert functionality built into ClickHouse: https://clickhouse.com/docs/optimize/asynchronous-inserts . All of these solutions are operationally simpler than Kafka + Vector, although…
There were a lot of simpler options that came to mind while reading through this, frankly. But I imagine the writeup eschews myriad future concerns and does not entirely illustrate the pressure and stress of trying to solve such a high-scale problem. Ultimately, going with a somewhat more complex solution that involves additional architecture but has been tried and tested by a 3rd party that you trust can sometimes b…
Re: Scaling request logging with ClickHouse, Kafka, and Vector
#6Re: Scaling request logging with ClickHouse, Kafka, and Vector
#7Re: Scaling request logging with ClickHouse, Kafka, and Vector
#8Re: Scaling request logging with ClickHouse, Kafka, and Vector
#9Tbh this terrifies me! We don’t just have to log the requests but also store the full emails for a few days, and they can be up to 50 mib in total size.
But it will be exciting when we get there!