1

I have 3 projects that need to use websockets. I am planning to use Laravel-Websockets. For that I want to create a separate project that will be the Laravel-Websockets server.

It also has support for multiple apps: https://beyondco.de/docs/laravel-websockets/basic-usage/pusher#configuring-websocket-apps

But what happens if one of the projects needs more connections for example? The way Laravel-Websockets support multiple apps is simply by adding it to the config file, but all use the same port.

Is there a way to separate the apps using the Laravel-Websockets server into actual separate servers in this way? Or I am going to have to create another Laravel-Websockets server for each other project (And in this case it would just be better to install the server in the project itself and not separately)?

I just wanted to make a centralized place for Laravel-Websockets where I can handle all other projects that needs websockets support but I am not sure how to do it in case it needs more specific cofiguration

pileup
  • 1
  • 2
  • 18
  • 45
  • 1
    Listening on a separate port is akin to starting a new server. – apokryfos May 23 '23 at 11:10
  • And it's not possible to do it via the same "centralized" Laravel-Websocket project? I will have to create another one? I thought that Laravel-Websocket would allow me to start a new server on the same Laravel-Websocket app so that I don't need to create separate projects for each – pileup May 23 '23 at 12:09
  • 2
    What Laravel-Websocket seems to allow you to do is to use a single server for multiple applications. Is there a specific reason you need a separate server for each application? If you do need a separate server for each application it does make more sense to incorporate it in the application itself, e.g. make package that you can install and configure on each application. – apokryfos May 23 '23 at 12:17

0 Answers0