ClickHouse > 实例探究 > 加速 GraphQL Hive 性能:从 Elasticsearch 迁移到 ClickHouse

加速 GraphQL Hive 性能:从 Elasticsearch 迁移到 ClickHouse

ClickHouse Logo
技术
  • 应用基础设施与中间件 - 数据库管理和存储
  • 基础设施即服务 (IaaS) - 云数据库
适用行业
  • 消费品
  • 石油和天然气
用例
  • 时间敏感网络
  • 交通监控
服务
  • 云规划/设计/实施服务
  • 系统集成
关于客户
本案例研究中的客户是 The Guild,一家专门为 GraphQL API 开发开源工具的公司。他们的产品之一 GraphQL Hive 是针对 GraphQL API 的架构注册、监控和分析解决方案。它可以帮助用户跟踪更改历史记录、防止 API 损坏并分析 API 流量。 Guild 团队熟悉 SQL,他们正在寻找一种易于学习和维护、具有出色性能、适合分析和数据聚合、具有内置 TTL、类型系统且没有任何问题的数据库解决方案高基数。
挑战
GraphQL Hive 是一种用于监控和分析 GraphQL API 的开源工具,它面临着严重的扩展问题。该工具可跟踪更改历史记录、防止 API 损坏并分析 API 流量,最初使用 Elasticsearch 进行数据存储。然而,随着数据量的增加,平均响应时间开始明显减慢。此外,索引过程存在问题,较大的用户会影响较小用户的查询性能。尽管尝试通过为每个用户创建索引来提高性能,但 Elasticsearch 的整体速度仍然低于预期。 GraphQL Hive 背后的公司 The Guild 的团队也发现 Elasticsearch 基于 JSON 的查询语言具有挑战性,因为他们更熟悉 SQL。
解决方案
为了寻找 Elasticsearch 的替代方案,The Guild 团队评估了多个数据库,包括 InfluxDB、TimescaleDB、Druid 和 ClickHouse。他们的要求包括易于学习和维护、卓越的性能、分析和数据聚合的适用性、内置 TTL、类型系统,并且没有高基数问题。经过测试,他们发现 ClickHouse 提供了最佳性能,查询时间约为 100 毫秒,而 Elasticsearch 为 10 秒。从 Elasticsearch 到 ClickHouse 的迁移是逐步完成的,数据写入两个目的地整整一个月,以确保零停机时间。该团队还开始转向 ClickHouse Cloud,利用其对分片和复制的开箱即用支持,为未来的扩展需求做好准备。
运营影响
  • The migration to ClickHouse resulted in significant operational improvements for The Guild. The team found ClickHouse easier to learn and maintain due to its SQL-like language, which was more familiar to them than Elasticsearch's JSON-based language. The performance of GraphQL Hive improved dramatically, with a 100x faster average response time. This allowed for more efficient monitoring and analysis of GraphQL APIs. The migration process was also smooth, with no downtime experienced. Looking ahead, the team is well-prepared for future scaling needs, thanks to the sharding and replication support provided by ClickHouse Cloud.
数量效益
  • The average response time improved from 10 seconds with Elasticsearch to approximately 100ms with ClickHouse, a 100x improvement.
  • The migration process was done with zero downtime.
  • The team was able to write data to both Elasticsearch and ClickHouse for a full month during the migration process.

Case Study missing?

Start adding your own!

Register with your work email and create a new case study profile for your business.

Add New Record

相关案例.

联系我们

欢迎与我们交流!
* Required
* Required
* Required
* Invalid email address
提交此表单,即表示您同意 IoT ONE 可以与您联系并分享洞察和营销信息。
不,谢谢,我不想收到来自 IoT ONE 的任何营销电子邮件。
提交

感谢您的信息!
我们会很快与你取得联系。