Skip to content

Commit e12ab3e

Browse files
authored
Merge pull request #266 from roadrunner-server/revert/connectrpc
revert(http): restore pool.Exec worker delivery, drop the Connect-RPC proxy
2 parents 6902c37 + c9dc945 commit e12ab3e

42 files changed

Lines changed: 3664 additions & 2777 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/config.go

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package config
22

33
import (
44
"strings"
5-
"time"
65

76
"github.com/roadrunner-server/http/v6/servers/fcgi"
87
"github.com/roadrunner-server/http/v6/servers/http3"
@@ -14,16 +13,16 @@ import (
1413

1514
// Config configures RoadRunner HTTP server.
1615
type Config struct {
16+
// RawBody if turned on, RR will not parse the incoming HTTP body and will send it as is
17+
RawBody bool `mapstructure:"raw_body"`
1718
// Host and port to handle as http server.
1819
Address string `mapstructure:"address"`
1920
// AccessLogs turn on/off, logged at Info log level, default: false
2021
AccessLogs bool `mapstructure:"access_logs"`
2122
// List of the middleware names (order will be preserved)
2223
Middleware []string `mapstructure:"middleware"`
23-
// Pool configures worker pool (lifecycle only; requests are delivered via Proxy).
24+
// Pool configures worker pool.
2425
Pool *pool.Config `mapstructure:"pool"`
25-
// Proxy configures the worker-facing ConnectRPC server.
26-
Proxy *Proxy `mapstructure:"proxy"`
2726
// InternalErrorCode used to override default 500 (InternalServerError) http code
2827
InternalErrorCode uint64 `mapstructure:"internal_error_code"`
2928
// MaxRequestSize specified max size for payload body in megabytes. 0 = 1GB.
@@ -43,33 +42,6 @@ type Config struct {
4342
GID int
4443
}
4544

46-
// Proxy configures the ConnectRPC server that PHP workers connect into.
47-
type Proxy struct {
48-
// Address is the TCP address the proxy server listens on, e.g. ":7070".
49-
Address string `mapstructure:"address"`
50-
// RequestTimeout caps how long a single request can sit waiting for a
51-
// worker to produce a response. Defaults to 60s.
52-
RequestTimeout time.Duration `mapstructure:"request_timeout"`
53-
// InboxSize bounds the in-process request queue. Submits beyond this
54-
// return 503 to the client. Defaults to 1024.
55-
InboxSize int `mapstructure:"inbox_size"`
56-
// DebugMode flips the handler into debug mode (verbose error bodies on 5xx).
57-
DebugMode bool `mapstructure:"debug"`
58-
}
59-
60-
func (p *Proxy) InitDefaults() {
61-
if p.Address == "" {
62-
// Bind to loopback by default
63-
p.Address = "127.0.0.1:7070"
64-
}
65-
if p.RequestTimeout == 0 {
66-
p.RequestTimeout = time.Minute
67-
}
68-
if p.InboxSize == 0 {
69-
p.InboxSize = 1024
70-
}
71-
}
72-
7345
// EnableHTTP is true when http server must run.
7446
func (c *Config) EnableHTTP() bool {
7547
return c.Address != ""
@@ -106,11 +78,6 @@ func (c *Config) InitDefaults() error {
10678
}
10779
c.Pool.InitDefaults()
10880

109-
if c.Proxy == nil {
110-
c.Proxy = &Proxy{}
111-
}
112-
c.Proxy.InitDefaults()
113-
11481
if c.InternalErrorCode == 0 {
11582
c.InternalErrorCode = 500
11683
}
@@ -157,15 +124,6 @@ func (c *Config) Valid() error {
157124
return errors.E(op, "malformed pool config")
158125
}
159126

160-
if c.Proxy != nil {
161-
if c.Proxy.RequestTimeout < 0 {
162-
return errors.E(op, errors.Str("proxy.request_timeout must be >= 0"))
163-
}
164-
if c.Proxy.InboxSize < 0 {
165-
return errors.E(op, errors.Str("proxy.inbox_size must be >= 0"))
166-
}
167-
}
168-
169127
if !c.EnableHTTP() && !c.EnableTLS() && !c.EnableFCGI() {
170128
return errors.E(op, errors.Str("unable to run http service, no method has been specified (http, https, http/2 or FastCGI)"))
171129
}

go.mod

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,28 @@ module github.com/roadrunner-server/http/v6
22

33
go 1.26
44

5-
toolchain go1.26.4
6-
75
require (
8-
connectrpc.com/connect v1.20.0
9-
github.com/caddyserver/certmagic v0.25.4
6+
github.com/caddyserver/certmagic v0.25.3
107
github.com/google/go-cmp v0.7.0
11-
github.com/google/uuid v1.6.0
128
github.com/mholt/acmez v1.2.0
139
github.com/prometheus/client_golang v1.23.2
14-
github.com/quic-go/quic-go v0.60.0
15-
github.com/roadrunner-server/api-go/v6 v6.0.0-beta.12
10+
github.com/quic-go/quic-go v0.59.0
11+
github.com/roadrunner-server/api-go/v6 v6.0.0-beta.12.0.20260714200341-93604e5012d4
1612
github.com/roadrunner-server/api-plugins/v6 v6.0.0-beta.2
1713
github.com/roadrunner-server/context v1.3.0
1814
github.com/roadrunner-server/endure/v2 v2.6.2
1915
github.com/roadrunner-server/errors v1.5.0
16+
github.com/roadrunner-server/goridge/v4 v4.0.0-beta.2.0.20260714195909-75e9ece43063
2017
github.com/roadrunner-server/pool/v2 v2.0.0-beta.1
2118
github.com/roadrunner-server/tcplisten v1.5.2
2219
github.com/stretchr/testify v1.11.1
23-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0
24-
go.opentelemetry.io/contrib/propagators/jaeger v1.44.0
25-
go.opentelemetry.io/otel v1.44.0
26-
go.opentelemetry.io/otel/trace v1.44.0
27-
golang.org/x/net v0.56.0
28-
golang.org/x/sys v0.46.0
29-
google.golang.org/genproto v0.0.0-20260630182238-925bb5da69e7
20+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0
21+
go.opentelemetry.io/contrib/propagators/jaeger v1.43.0
22+
go.opentelemetry.io/otel v1.43.0
23+
go.opentelemetry.io/otel/trace v1.43.0
24+
golang.org/x/net v0.54.0
25+
golang.org/x/sys v0.44.0
26+
google.golang.org/genproto v0.0.0-20260504160031-60b97b32f348
3027
google.golang.org/protobuf v1.36.11
3128
)
3229

@@ -35,39 +32,39 @@ require (
3532
github.com/caddyserver/zerossl v0.1.5 // indirect
3633
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3734
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
38-
github.com/felixge/httpsnoop v1.1.0 // indirect
35+
github.com/felixge/httpsnoop v1.0.4 // indirect
36+
github.com/go-jose/go-jose/v4 v4.1.4 // indirect
3937
github.com/go-logr/logr v1.4.3 // indirect
4038
github.com/go-logr/stdr v1.2.2 // indirect
4139
github.com/go-ole/go-ole v1.3.0 // indirect
42-
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
40+
github.com/google/uuid v1.6.0 // indirect
41+
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
4342
github.com/libdns/libdns v1.1.1 // indirect
4443
github.com/mholt/acmez/v3 v3.1.6 // indirect
4544
github.com/miekg/dns v1.1.72 // indirect
4645
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4746
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
4847
github.com/prometheus/client_model v0.6.2 // indirect
49-
github.com/prometheus/common v0.69.0 // indirect
50-
github.com/prometheus/procfs v0.21.1 // indirect
48+
github.com/prometheus/common v0.67.5 // indirect
49+
github.com/prometheus/procfs v0.20.1 // indirect
5150
github.com/quic-go/qpack v0.6.0 // indirect
5251
github.com/roadrunner-server/events v1.0.1 // indirect
53-
github.com/roadrunner-server/goridge/v4 v4.0.0-beta.2 // indirect
5452
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
55-
github.com/tklauser/go-sysconf v0.4.0 // indirect
56-
github.com/tklauser/numcpus v0.12.0 // indirect
53+
github.com/tklauser/go-sysconf v0.3.16 // indirect
54+
github.com/tklauser/numcpus v0.11.0 // indirect
5755
github.com/yusufpapurcu/wmi v1.2.4 // indirect
5856
github.com/zeebo/blake3 v0.2.4 // indirect
5957
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
60-
go.opentelemetry.io/otel/metric v1.44.0 // indirect
58+
go.opentelemetry.io/otel/metric v1.43.0 // indirect
6159
go.uber.org/mock v0.6.0 // indirect
6260
go.uber.org/multierr v1.11.0 // indirect
6361
go.uber.org/zap v1.28.0 // indirect
6462
go.uber.org/zap/exp v0.3.0 // indirect
65-
golang.org/x/crypto v0.53.0 // indirect
66-
golang.org/x/mod v0.37.0 // indirect
67-
golang.org/x/sync v0.21.0 // indirect
68-
golang.org/x/text v0.38.0 // indirect
69-
golang.org/x/tools v0.47.0 // indirect
70-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260630182238-925bb5da69e7 // indirect
71-
google.golang.org/grpc v1.82.0 // indirect
63+
go.yaml.in/yaml/v2 v2.4.4 // indirect
64+
golang.org/x/crypto v0.51.0 // indirect
65+
golang.org/x/mod v0.36.0 // indirect
66+
golang.org/x/sync v0.20.0 // indirect
67+
golang.org/x/text v0.37.0 // indirect
68+
golang.org/x/tools v0.45.0 // indirect
7269
gopkg.in/yaml.v3 v3.0.1 // indirect
7370
)

0 commit comments

Comments
 (0)