Skip to content

api separation#583

Merged
g11tech merged 4 commits intomainfrom
api-separation
Feb 24, 2026
Merged

api separation#583
g11tech merged 4 commits intomainfrom
api-separation

Conversation

@chetanyb
Copy link
Copy Markdown
Contributor

@chetanyb chetanyb commented Feb 20, 2026

Summary

Closes #513

  • Split single HTTP server into dedicated API server (default port 9667) and Metrics server (default port 9668)
  • API server handles: /lean/v0/health, /events (SSE), /api/forkchoice/graph, /lean/v0/states/finalized
  • Metrics server handles: /metrics (Prometheus)
  • Added --metrics-port CLI flag for both node and beam commands

Additional improvements

  • Startup synchronization: servers now return error if port binding fails (previously silent)
  • Port conflict validation: prevents using same port for both servers
  • Double-stop protection: calling stop() twice is now safe
  • Fixed missing errdefer for beam_node cleanup

Note: Both the servers are enabled together

@chetanyb chetanyb force-pushed the api-separation branch 3 times, most recently from e87e0e8 to f5cdae2 Compare February 20, 2026 07:07
@chetanyb chetanyb marked this pull request as ready for review February 20, 2026 07:25
@g11tech g11tech changed the title Api separation api separation Feb 24, 2026
@g11tech g11tech merged commit b9607af into main Feb 24, 2026
8 checks passed
@g11tech g11tech deleted the api-separation branch February 24, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Separate metrics and functional endpoints into separate http servers

2 participants