Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow Response Times When Deploying Across Multiple Regions with Kanta Active #55

Open
vladnec opened this issue Mar 26, 2024 · 0 comments

Comments

@vladnec
Copy link

vladnec commented Mar 26, 2024

We are experiencing significant latency issues with our Elixir application deployed on Fly.io, particularly when deploying across multiple regions (Frankfurt and London) with Kanta activated. The response time deteriorates from 0.2 seconds to more than 5 seconds under these conditions.

Configuration Details
Below are the relevant parts of our configuration, highlighting the setup for Kanta and the application's supervision tree.

Here is my configuration:

config.exs

config :nexus, Kanta,
  endpoint: NexusWeb.Endpoint,
  repo: Nexus.Repo.Local,
  otp_name: :nexus,
  plugins: []

prod.exs

config :nexus, gettext_repo: Kanta.Gettext.Repo

application.ex

def start(_type, _args) do
    children = [
       ....
       {Kanta, Application.fetch_env!(:nexus, Kanta)},
       ...
     ]
    opts = [strategy: :one_for_one, name: Nexus.Supervisor]
    Supervisor.start_link(children, opts)
end

lib/nexus_web/gettext

defmodule NexusWeb.Gettext do
  use Gettext,
    otp_app: :nexus,
    repo: Application.compile_env(:nexus, :gettext_repo)
end

Additional Information
This issue might be related to Fly.Postgres, considering the multi-region deployment aspect.
We have not observed any relevant logs that directly point to the cause of the latency.

Do you know what the exact problem might be and what could we do to try and find a solution?

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant