You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/horizontal-scaling/getting-started.md
+2-37Lines changed: 2 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,43 +27,8 @@ To enable the replication, simply change the `replication.driver` name in the `w
27
27
],
28
28
```
29
29
30
+
Now, when your app broadcasts the message, it will make sure the connection reaches other servers which are under the same load balancer.
31
+
30
32
The available drivers for replication are:
31
33
32
34
-[Redis](redis)
33
-
34
-
## Configure the Broadcasting driver
35
-
36
-
Laravel WebSockets comes with an additional `websockets` broadcaster driver that accepts configurations like the Pusher driver, but will make sure the broadcasting will work across all websocket servers:
37
-
38
-
```php
39
-
'connections' => [
40
-
'pusher' => [
41
-
...
42
-
],
43
-
44
-
'websockets' => [
45
-
'driver' => 'websockets',
46
-
'key' => env('PUSHER_APP_KEY'),
47
-
'secret' => env('PUSHER_APP_SECRET'),
48
-
'app_id' => env('PUSHER_APP_ID'),
49
-
'options' => [
50
-
'cluster' => env('PUSHER_APP_CLUSTER'),
51
-
'encrypted' => true,
52
-
'host' => env('PUSHER_APP_HOST', '127.0.0.1'),
53
-
'port' => env('PUSHER_APP_PORT', 6001),
54
-
'scheme' => env('PUSHER_APP_SCHEME', 'http'),
55
-
'curl_options' => [
56
-
CURLOPT_SSL_VERIFYHOST => 0,
57
-
CURLOPT_SSL_VERIFYPEER => 0,
58
-
],
59
-
],
60
-
],
61
-
```
62
-
63
-
Make sure to change the `BROADCAST_DRIVER`:
64
-
65
-
```
66
-
BROADCAST_DRIVER=websockets
67
-
```
68
-
69
-
Now, when your app broadcasts the message, it will make sure the connection reaches other servers which are under the same load balancer.
0 commit comments