CARVIEW |
Select Language
HTTP/2 200
date: Tue, 29 Jul 2025 07:05:34 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/supabase/realtime.git
etag: W/"b4f68354d15ceebf2c13669a165b9dc2"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=TvuT9sgrmGCqqAsJB0nuOKm8vvaFOXZHwnmAkMD5M7pbhI1qDaUS8y5LpgzC1qXA9%2FVdTaKd6MnLVSxHlXRhKHLz9NY%2BvxxppYZCwXQ4zIoeoNFW1Kcj1cFT0DhpTRkgjH3reWAq%2F0tmLW0dRppMzlw5KtlVcI5ygfoT%2FpM57fc1yxXLJXHfczxpRjY2WUfYfTUrk0daaVrWrGWcc1vzdg%2F4QI7ZI2L7%2BgYvQAk%2BNkmiw%2BRyu2cX1Duhv%2BCS93AQ9gAKl8%2Fgr72rYuVaIQ1nlA%3D%3D--Cw0wB4ZgbyCEsfeo--IVzNayLt3lsEG%2FGeE9L%2FRg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.464454374.1753772733; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 07:05:33 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 29 Jul 2026 07:05:33 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: A80C:812B8:52C4F1:698DF3:688872BD
fix: add channel tracking capabilities to sockets (#1463) · supabase/realtime@6e9e618 · GitHub
Copy file name to clipboardExpand all lines: lib/realtime/application.ex
Copy file name to clipboardExpand all lines: lib/realtime_web/channels/realtime_channel.ex
Copy file name to clipboard
Copy file name to clipboardExpand all lines: lib/realtime_web/channels/user_socket.ex
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 379
Commit 6e9e618
authored
fix: add channel tracking capabilities to sockets (#1463)
* Adds a new Tracker process that:
* uses ets to track how many channels each transport pid has
* every X ms (setup via NO_CHANNEL_TIMEOUT_IN_MS) checks which pids have <0 counters and kills the associated pid
* realtime channel increments on join
* realtime channel decrements on terminate
* Moves some elements from rt_channel_test to other modules as we need to start think about ways of reducing the cognitive load of this file1 parent 738971b commit 6e9e618Copy full SHA for 6e9e618
File tree
Expand file treeCollapse file tree
11 files changed
+409
-126
lines changedFilter options
- config
- lib
- realtime_web/channels
- realtime_channel
- realtime
- test
- integration
- realtime_web/channels/realtime_channel
- support
Expand file treeCollapse file tree
11 files changed
+409
-126
lines changed+56-55Lines changed: 56 additions & 55 deletions
Large diffs are not rendered by default.
+11-1Lines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 |
| |
35 | 38 |
| |
36 | 39 |
| |
| |||
48 | 51 |
| |
49 | 52 |
| |
50 | 53 |
| |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
51 | 59 |
| |
52 | 60 |
| |
53 | 61 |
| |
| |||
79 | 87 |
| |
80 | 88 |
| |
81 | 89 |
| |
| 90 | + | |
82 | 91 |
| |
83 |
| - | |
| 92 | + | |
| 93 | + | |
84 | 94 |
| |
85 | 95 |
| |
86 | 96 |
| |
|
lib/realtime/application.ex
Copy file name to clipboardExpand all lines: lib/realtime/application.ex+4Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| 13 | + | |
13 | 14 |
| |
14 | 15 |
| |
15 | 16 |
| |
| |||
52 | 53 |
| |
53 | 54 |
| |
54 | 55 |
| |
| 56 | + | |
55 | 57 |
| |
56 | 58 |
| |
| 59 | + | |
57 | 60 |
| |
58 | 61 |
| |
59 | 62 |
| |
| |||
92 | 95 |
| |
93 | 96 |
| |
94 | 97 |
| |
| 98 | + | |
95 | 99 |
| |
96 | 100 |
| |
97 | 101 |
| |
|
lib/realtime_web/channels/realtime_channel.ex
Copy file name to clipboardExpand all lines: lib/realtime_web/channels/realtime_channel.ex+5-2Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
29 | 30 |
| |
30 | 31 |
| |
31 | 32 |
| |
| |||
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
| 46 | + | |
45 | 47 |
| |
46 | 48 |
| |
47 | 49 |
| |
| |||
351 | 353 |
| |
352 | 354 |
| |
353 | 355 |
| |
354 |
| - | |
| 356 | + | |
355 | 357 |
| |
356 | 358 |
| |
357 | 359 |
| |
| |||
473 | 475 |
| |
474 | 476 |
| |
475 | 477 |
| |
476 |
| - | |
| 478 | + | |
477 | 479 |
| |
478 | 480 |
| |
| 481 | + | |
479 | 482 |
| |
480 | 483 |
| |
481 | 484 |
| |
|
lib/realtime_web/channels/realtime_channel/tracker.ex
Copy file name to clipboard+88Lines changed: 88 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + |
lib/realtime_web/channels/user_socket.ex
Copy file name to clipboardExpand all lines: lib/realtime_web/channels/user_socket.ex+13-14Lines changed: 13 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
13 |
| - | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
38 | 37 |
| |
39 | 38 |
| |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 |
| - | |
45 | 39 |
| |
46 | 40 |
| |
47 |
| - | |
| 41 | + | |
48 | 42 |
| |
49 | 43 |
| |
50 | 44 |
| |
51 | 45 |
| |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 |
| |
53 | 57 |
| |
54 | 58 |
| |
| |||
77 | 81 |
| |
78 | 82 |
| |
79 | 83 |
| |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
| 84 | + | |
86 | 85 |
| |
87 | 86 |
| |
88 | 87 |
| |
|
+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
|
You can’t perform that action at this time.
0 commit comments