-
Notifications
You must be signed in to change notification settings - Fork 39
chore(lazer) How Lazer works #879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
||
- **Authentication**: Validates publisher access tokens and optional Ed25519 signatures. | ||
- **Rate limiting**: Enforces configurable limits of price updates per publisher. | ||
- **Message forwarding**: Publishes validated updates to NATS or Kafka. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't mention Kafka because we're not currently using it. I'd also add some description for the role of NATS, like this:
- **Message forwarding**: Publishes validated updates to NATS or Kafka. | |
- **Message forwarding**: Publishes validated updates to an internal message queue (a NATS cluster). |
- **History Service**: Maintains a connection to the History Service to cache historical data for circuit breaker validation. | ||
|
||
The Relayer also maintains a connection to the History Service to cache historical data for circuit breaker validation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct. Relayer doesn't connect to history service.
### Aggregator Component | ||
|
||
The Aggregator is a library component embedded within both the Router and History Service. | ||
It consumes publisher updates from the message bus and computes aggregated price feeds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try to call them just "feeds", not "price feeds", because there are also feeds for funding rates, and more kinds of feeds may be added later.
The system supports dual message queue backends for flexibility. This allows the system to be deployed in a multi-datacenter environment. | ||
|
||
- **NATS Jetstream**: Provides pub/sub messaging with stream persistence. | ||
- **Apache Kafka**: Can be used instead of NATS for message transport. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to talk about Kafka because we don't use it (yet?).
|
||
The architecture consists of four main services that work together to provide ultra-low-latency data to consumers. | ||
|
||
### INSERT DIAGRAM HERE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want the "components" below to actually be "services" for clarity. This will also allow you to line up the elements in the diagram with the text blocks below. Given that, the subsections below should be: publishers, relayers, message queue, routers, history service
Aggregation logic can be rolled into routers, and you can drop the message transport layer part.
Also, please include who operates the components and the stuff around no reordering etc etc that we discussed
Description
Type of Change
Areas Affected
Checklist
pre-commit run --all-files
to check for linting errorsRelated Issues
Closes #
Additional Notes
Contributor Information
Screenshots