Skip to content
代码片段 群组 项目
未验证 提交 0535ff53 编辑于 作者: Stan Hu's avatar Stan Hu
浏览文件

Move Google IP fetch into a separate service with rate limiting

Previously the initial merge request in the Google CDN code
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/96336 would
fetch the list of Google IPs within the same thread as the process
that attempts to serve out a Google CDN-frontend URL. However, there
are several issues with this:

1. If the HTTP endpoint is slow or down for some reason, this will
delay the response handling.

2. There is no throttling to prevent excessive requests to this
endpoint.

To improve the reliability, we move the fetching of this URL to a
background Sidekiq job that has an application rate limit to prevent
too many requests. The initial limit is 10 requests in a minute, which
should should be adequate since we only need one worker to populate
the cache for a whole day.

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/373115

Changelog: changed
上级 9f9090d4
No related branches found
No related tags found
加载中
显示 357 个添加119 个删除
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册