减缓logstash调用http接口的速度

logstash的调用速度降下来了。
测试环境测试成功。

解决方案:
修改output的两个参数pool_max和pool_max_per_route。

根据:
output plugins说明:
This output lets you send events to a generic HTTP(S) endpoint.

This output will execute up to pool_max requests in parallel for performance. Consider this when tuning this plugin for performance.

两个参数说明:
pool_max:Max number of concurrent connections. Defaults to 50

pool_max_per_route:Max number of concurrent connections to a single host. Defaults to 25

所以通过调整这两个参数,可以调整logstash的output的并发请求速度。

 

尝试过但错误的方案:
修改filter plugins的sleep参数,测试环境测试了好几次没有效果。
This will cause logstash to stall for the given amount of time.
官方文档写的是让logstash停指定时间,这里没有说明是读取input还是output的send,抑或是整个logstash的流程。

(新手入门,只是个人根据文档测试得到的solution,有问题请大佬多多指教,谢谢。)

参考文档
https://www.elastic.co/guide/en/logstash/current/plugins-outputs-http.html
https://www.elastic.co/guide/en/logstash/current/plugins-filters-sleep.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值