perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Document Caddy upstream keepalive requirement

alice 26903854 b293b6c4

+33 -5
+33 -5
docs/DEPLOYMENT.md
··· 167 167 ```caddy 168 168 pds.example.com { 169 169 encode gzip 170 - reverse_proxy 127.0.0.1:7755 170 + reverse_proxy 127.0.0.1:7755 { 171 + transport http { 172 + keepalive off 173 + } 174 + } 171 175 } 172 176 ``` 173 177 178 + If you run `perlsky` behind Caddy using the single-process `script/perlsky daemon` 179 + listener shown above, disable Caddy's upstream keepalive reuse for that backend. 180 + The Mojolicious daemon closes idle backend sockets after a short timeout, and Caddy 181 + can otherwise reuse a stale upstream connection and surface intermittent `502` 182 + responses on requests such as `com.atproto.server.createSession`. If you use a 183 + different proxy, make sure its upstream keepalive behavior and idle timeouts are 184 + compatible with the backend, or disable upstream reuse there as well. 185 + 174 186 For public user handles you also need a matching wildcard-capable site or on-demand TLS path for `*.pds.example.com`. 175 187 176 188 One practical Caddy pattern is on-demand TLS restricted to domains that `perlsky` approves: ··· 184 196 185 197 pds.example.com { 186 198 encode gzip 187 - reverse_proxy 127.0.0.1:7755 199 + reverse_proxy 127.0.0.1:7755 { 200 + transport http { 201 + keepalive off 202 + } 203 + } 188 204 } 189 205 190 206 https:// { ··· 195 211 @perlsky_handles host *.pds.example.com 196 212 handle @perlsky_handles { 197 213 encode gzip 198 - reverse_proxy 127.0.0.1:7755 214 + reverse_proxy 127.0.0.1:7755 { 215 + transport http { 216 + keepalive off 217 + } 218 + } 199 219 } 200 220 } 201 221 ``` ··· 207 227 ```caddy 208 228 @blob_download path /xrpc/com.atproto.sync.getBlob 209 229 handle @blob_download { 210 - reverse_proxy 127.0.0.1:7755 230 + reverse_proxy 127.0.0.1:7755 { 231 + transport http { 232 + keepalive off 233 + } 234 + } 211 235 } 212 236 213 237 handle { 214 238 encode gzip 215 - reverse_proxy 127.0.0.1:7755 239 + reverse_proxy 127.0.0.1:7755 { 240 + transport http { 241 + keepalive off 242 + } 243 + } 216 244 } 217 245 ``` 218 246