Hi guys.
I’m trying to run my phoenix app on 2 notebooks (ubuntu) in same time (distributed programming).
My goal is: Run application from 2 nodes(independent notebooks) in same time (it should increase throughput)
I found this article:
I created sys.config file:
[{kernel,
[
{sync_nodes_optional, ['n1@127.0.0.1', 'n2@127.0.0.1']},
{sync_nodes_timeout, 10000}
]}
].
Then I made release:
http://www.phoenixframework.org/docs/advanced-deployment
When I run application from release I can see error on console->
[error] Could not check origin for Phoenix.Socket transport.
This happens when you are attempting a socket connection to
a different host than the one configured in your config/
files. For example, in development the host is configured
to "localhost" but you may be trying to access it from
"127.0.0.1". To fix this issue, you may either:
1. update [url: [host: ...]] to your actual host in the
config file for your current environment (recommended)
2. pass the :check_origin option when configuring your
endpoint or when configuring the transport in your
UserSocket module, explicitly outlining which origins
are allowed:
check_origin: ["https://example.com",
"//another.com:888", "//other.com"]
But I need only test it in my local network (nooteboks are connected via wifi)
In prod.exs file I have url set to:
url: [host: "example.com"],
But what should I do next? How should I run application from third device ? (load should be splited into these 2 notebooks)
Thanks