Comments (7)
As I'm researching I've found DNS_NODES param, not sure if this works off of FLY yet? Looking for something that works in kubernetes or docker swarm.
from realtime.
Hi @menasheh
You might be having issues because you actually need to connect the erlang nodes. we're using libcluster postgres strategy to achieve it in Realtime.
Where are you deploying your system? In theory the only thing you will need is to be able to ping another machines host name and that should be enough for them to connect between them.
More details on the strategy: https://github.com/supabase/libcluster_postgres
from realtime.
Thanks @filipecabaco. If I understood this correctly, the default cluster strategy is DNS, but I can set CLUSTER_STRATEGIES: "POSTGRES"
to change this? So far this is not working.
We're deploying on linux servers in a company-owned private cloud environment, using either Docker or Kubernetes.
Attaching section of logs from one of the kubernetes pods:
18:23:35.074 [debug] QUERY OK db=42.6ms
grant all on table public.test_tenant to authenticated; []
18:23:35.160 [debug] QUERY OK db=43.0ms
create publication supabase_realtime for table public.test_tenant []
18:23:35.205 [debug] QUERY OK db=45.5ms
commit []
18:23:37.290 [notice] :alarm_handler: {:set, {:system_memory_high_watermark, []}}
18:23:37.375 [info] Elixir.Realtime.SignalHandler is being initialized...
18:23:37.376 [notice] SYN[[email protected]] Adding node to scope <Elixir.Realtime.Tenants.Connect>
18:23:37.377 [notice] SYN[[email protected]] Creating tables for scope <Elixir.Realtime.Tenants.Connect>
18:23:37.377 [notice] SYN[[email protected]|registry<Elixir.Realtime.Tenants.Connect>] Discovering the cluster
18:23:37.377 [notice] SYN[[email protected]|pg<Elixir.Realtime.Tenants.Connect>] Discovering the cluster
18:23:37.377 [notice] SYN[[email protected]] Adding node to scope <users>
18:23:37.377 [notice] SYN[[email protected]] Creating tables for scope <users>
18:23:37.377 [notice] SYN[[email protected]|registry<users>] Discovering the cluster
18:23:37.377 [notice] SYN[[email protected]|pg<users>] Discovering the cluster
18:23:37.377 [notice] SYN[[email protected]] Adding node to scope <Elixir.RegionNodes>
18:23:37.377 [notice] SYN[[email protected]] Creating tables for scope <Elixir.RegionNodes>
18:23:37.377 [notice] SYN[[email protected]|registry<Elixir.RegionNodes>] Discovering the cluster
18:23:37.378 [notice] SYN[[email protected]|pg<Elixir.RegionNodes>] Discovering the cluster
18:23:37.378 [warning] Replica region not found, defaulting to Realtime.Repo
18:23:37.384 [info] Running RealtimeWeb.Endpoint with cowboy 2.10.0 at :::4000 (http)
18:23:37.384 [info] Access RealtimeWeb.Endpoint at http://realtime.fly.dev
18:23:37.385 [notice] SYN[[email protected]] Adding node to scope <Elixir.PostgresCdcStream>
18:23:37.386 [notice] SYN[[email protected]] Creating tables for scope <Elixir.PostgresCdcStream>
18:23:37.386 [notice] SYN[[email protected]|registry<Elixir.PostgresCdcStream>] Discovering the cluster
18:23:37.386 [notice] SYN[[email protected]|pg<Elixir.PostgresCdcStream>] Discovering the cluster
18:23:37.387 [notice] SYN[[email protected]] Adding node to scope <Elixir.Extensions.PostgresCdcRls>
18:23:37.387 [notice] SYN[[email protected]] Creating tables for scope <Elixir.Extensions.PostgresCdcRls>
18:23:37.387 [notice] SYN[[email protected]|registry<Elixir.Extensions.PostgresCdcRls>] Discovering the cluster
18:23:37.388 [notice] SYN[[email protected]|pg<Elixir.Extensions.PostgresCdcRls>] Discovering the cluster
18:23:37.617 [info] [libcluster:postgres] Connected to Postgres database
18:23:38.180 request_id=F6JOxT985rM4oT0AAAtB [info] GET /
18:23:38.180 request_id=F6JOxT985rM4oT0AAAtB [debug] Processing with RealtimeWeb.PageLive.Index.index/2
Parameters: %{}
Pipelines: [:browser]
18:23:38.187 request_id=F6JOxT985rM4oT0AAAtB [info] Sent 200 in 6ms
18:23:38.374 [warning] Replica region not found, defaulting to Realtime.Repo
from realtime.
How does realtime get the hostname?
from realtime.
that might be the issue. we're using a vpc to achieve it so the ips are discoverable between all nodes which means that it works for Postgres libcluster strategy to just do a quick node()
( see here )
are you able to ping the hostnames / ip's from one container to another?
from realtime.
Related Issues (20)
- Realtime version and release don't match HOT 1
- log_min_messages requires elevated privileges HOT 1
- Docker hub `latest` image tag is very old HOT 3
- What version of realtime is hosted Supabase using? HOT 1
- Add region to all Logger metadatas
- Realtime: Self Hosting - Docker Swarm mode HOT 6
- Docker-compose file appears to be broken HOT 40
- Unable to use null filters like 'parent IS NULL' in supabase realtime. HOT 3
- How is postgres binary data serialized?
- > Does supabase have null filters? HOT 1
- Self hosted : failed to connect: ** (Postgrex.Error) ssl not available HOT 1
- Startup error running migrations: table identifier does not refer to an existing ETS table HOT 9
- Erroneous public.test_tenant file from Supabase Realtime Migrations HOT 5
- Supabase Realtime Subscript Fails With Undefined Error (Possibly: `Auth error: tenant 'realtime-dev' not found` HOT 15
- supabase realtime not working HOT 26
- Seeds broken in latest docker image HOT 2
- HTTP 431 & Realtime Subscriptions Failing HOT 11
- Realtime event broadcasting through REST calls does not work HOT 8
- Excessive logs being printed to STD OUT/ERR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realtime.