build a new release - #20
Merged
Merged
Conversation
docs: remove debug logs from ServerManager and RouteRule refactor: simplify RouteRule constructor logging
The cluster map uses node.getFullHost() as its key (e.g. 'http://localhost:8080'), but ClusterManager.onClusterEvent() was calling updateStatusServer() with statusEvent.nodeId() — which holds the node name — not the map key. Since containsKey(nodeId) always returned false, the in-memory state of the server was never updated after status-change events (ONLINE, UNSTABLE, etc). Fix: use statusEvent.host() as the lookup key, which is set to node.getFullHost() by the dispatcher (ThreadPingScheduler and ClusterService).
Previously the ConcurrentHashMap<String, ServerNode> used node.getFullHost() (e.g. 'http://localhost:8080') as its key. This caused NodeStatusChanged events to silently fail state updates because the event carried nodeId (the node name), not the fullHost. This commit migrates the key to node.getId() (the stable, immutable node name) across all layers: - Cluster.java: addClusterNode, validServer, updateStatusServer, updateServerNode, removeClusterNode, toggleAllServers, findNodeKey, endBootstrapPhase, registerServer, registerLoadedServer, staticNodes/persistedStaticNodes sets. - LocalFilePersistenceAdapter.java: saveClusterState uses node.getId() as the persistence key; loadClusterStateProperties duplicate-guard uses node.getId(). - ClusterManager.java: onClusterEvent now correctly passes statusEvent.nodeId() (the stable identity) to updateStatusServer. - TuiKeyHandler.java: deregisterServer uses node.getId(). - Tests updated: ClusterTest, L7RoutingTest, L4RoutingTest, StateOrchestrationTest all updated to use nodeId-based API. All 94 tests pass.
…protocol Each ServerNode now declares its routing protocol (HTTP, TCP, GRPC) independently of its PingProtocol. Default is HTTP for full backward compatibility. Fluent builder: gateway.registerNode(...).routingProtocol(TCP).register()
…outing - ServerTransport.listen() now receives List<Cluster> instead of single Cluster - ServerManager holds List<Cluster>, backward-compatible single-Cluster constructors preserved - HttpTransport + UndertowHttpTransport: filter chain built per cluster; HTTP nodes only route traffic if routingProtocol == HTTP or GRPC - TcpProxyTransport: routes to nodes across all clusters where routingProtocol == TCP - Cluster.registerServer/registerLoadedServer: preserve routingProtocol on node copy - Tests updated: transport.listen() calls wrapped with List.of(), L4 test nodes declared as RoutingProtocol.TCP
…ation - ExternalAuthFilter: @order(20) filter that delegates auth to an external HTTP service. Forwards Authorization, X-Cluster-Token, X-Real-IP, X-Forwarded-For, Cookie and X-Original-URI headers. Returns 401 on denial, 502 on service error. - GatewayBuilderPort: new authService(url) and authService(url, timeoutMs) methods - LocalGatewayAdapter: implements both methods, wires ExternalAuthFilter via registerFilter()
refactor(HttpTransport): move imports, change http version to HTTP_1_1 fix(HttpTransport): add error handling for proxy requests refactor(HttpTransport): improve code readability and structure
Fix/16 servernode state telemetry
…op test assertion
…anup static pool state
…iding container hangs
…ope route registration logs
…path and ThreadPingScheduler
… and Docker executions
…ver with unit tests
…o Loom virtual thread executor
…y-hop response headers to maximize keep-alive connection reuse
…ecutor to prevent platform worker thread starvation under blocking L7 routing calls
…aultByteBufferPool to prevent direct memory OOM leaks under virtual threads load
…eap buffers to avoid thread pool lock contention under high concurrency
…e size to 2 to eliminate virtual thread ThreadLocal memory footprint bloat under high load
…cal custom routes to bypass virtual threads and blocking I/O stream overhead
…DK HttpTransport and reuse pooled byte arrays for L7 proxy stream copying in ReverseProxyService
…ter chain execution and full virtual threads execution for all routes, protecting event loops from developer blocking code
…ng annotation to run specific non-blocking local routes on the event loop
…oid redundant 16KB array allocations per request, reducing GC overhead and latency under high concurrency
…method refactor(UndertowHttpTransport): extract route execution logic into separate method fix(.gitignore): add .tmp to ignored files chore(pom.xml): update version from 1.4.9-SNAPSHOT to 1.4.9-release
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.