hello.
I want fetch google certificates by net http client in ruby. This is below code.
CERTS_URI = 'https://www.googleapis.com/robot/v1/metadata/x509/securetoken@system.gserviceaccount.com'
res = Net::HTTP.get_response(URI(CERTS_URI))
Though simple request is, response is too slow only when my app is deployed to fly. The time is about 2 minutes. Sometimes, I can not get response by Timeout Failure.
But, when the app is deployed to heroku, I get response in less than 1s.
I do not know why that happens. Is this fly.io problem?
This is my toml file.
# fly.toml file generated for XXXX on 2022-08-12T14:21:16+09:00
app = "XXXX"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[build]
[build.args]
BUNDLER_VERSION = "2.3.20"
NODE_VERSION = "14"
RUBY_VERSION = "3.1.1"
[deploy]
release_command = "bundle exec rails db:migrate"
[env]
PORT = "8080"
SERVER_COMMAND = "bundle exec puma -C config/puma.rb"
[experimental]
allowed_public_ports = []
auto_rollback = true
[processes]
web = "bundle exec puma -C config/puma.rb"
worker = "bundle exec sidekiq -C config/sidekiq.yml"
[[services]]
http_checks = []
internal_port = 8080
processes = ["web"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
[[statics]]
guest_path = "/app/public"
url_prefix = "/"