-
Notifications
You must be signed in to change notification settings - Fork 92
docs(compression-coordinator): Add a user guide for using compression-coordinator.
#2456
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
Draft
LinZhihao-723
wants to merge
6
commits into
y-scope:main
Choose a base branch
from
LinZhihao-723:compression-coordinator-user-doc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
120df38
WIP.
LinZhihao-723 99f2b4b
WIP.
LinZhihao-723 f76c048
Add TDL package's readme.
LinZhihao-723 cfd675c
Remove log-ingestor-benchmark's readme, which was committed by mistake.
LinZhihao-723 337272b
Add notes for Spider.
LinZhihao-723 c998f8d
Draft finished.
LinZhihao-723 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # API Server | ||
|
|
||
| The CLP API Server is a Rust-based HTTP server that exposes CLP functionality through REST APIs. | ||
|
|
||
| ## API reference | ||
|
|
||
| All available API endpoints are defined in the [OpenAPI][openapi] Specification. The generated | ||
| specification can be found [here][static-api-reference]. | ||
|
|
||
| [openapi]: https://swagger.io/specification/ | ||
| [static-api-reference]: ../../docs/src/_static/generated/api-server-openapi.json |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # CLP Rust Utilities | ||
|
|
||
| This Rust crate contains common utilities used by other Rust components in the CLP package. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # CLP TDL Package | ||
|
|
||
| This component contains implementations of CLP tasks that run on Spider. It provides a shared | ||
| library that conforms to Spider's Task Definition Language (TDL) package specification. | ||
|
|
||
| ## Tasks | ||
|
|
||
| This component bundles all supported CLP tasks into a single TDL package. The available tasks are | ||
| documented below. | ||
|
|
||
| ### Compression | ||
|
|
||
| * `compression::clp_s_s3_compress`: Compress inputs from S3 using `clp-s`. | ||
| * `compression::commit`: Commit compression task outcomes to the CLP metadata database. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Compression Coordinator | ||
|
|
||
| This Rust component coordinates CLP compression jobs. It fetches newly created jobs, submits them to | ||
| Spider, and monitors their progress. |
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
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
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
60 changes: 60 additions & 0 deletions
60
docs/src/user-docs/guides-using-compression-coordinator.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Using `compression-coordinator` | ||
|
|
||
| `compression-coordinator` is a new component that coordinates compression jobs on [Spider][spider]. | ||
| It is designed to replace the existing `compression-scheduler`, which schedules compression jobs | ||
| using Celery. | ||
|
|
||
| To use `compression-coordinator`, enable the Spider scheduling framework when starting the CLP | ||
| package. | ||
|
|
||
| TODO: Link to Chenxing's doc. | ||
|
|
||
| :::{note} | ||
| Currently, `compression-coordinator` can be deployed only on Kubernetes using the CLP Helm chart. | ||
| Support for Docker Compose deployments is planned for a future release. | ||
| ::: | ||
|
|
||
| Compared with `compression-scheduler`, `compression-coordinator` provides the following improvements | ||
| to the user experience, reliability, and performance: | ||
|
|
||
| * **Automatic failure recovery**: If a service fails or restarts, `compression-coordinator` | ||
| automatically resumes previously submitted jobs. Users do not need to restart them manually. | ||
| * **Improved resource utilization**: Compression jobs run in a Spider-managed execution environment, | ||
| allowing computational resources to be shared more effectively across all configured workers. | ||
| * **Configurable retries for compression failures**: `compression-coordinator` allows users to | ||
| configure a simple retry policy for failed compression tasks. Automatic retries can help recover | ||
| from transient issues, such as temporary network interruptions, without requiring user | ||
| intervention. | ||
| * TODO: Configure retry policy through <LINK> | ||
| * **Improved fairness across concurrent compression jobs**: `compression-coordinator` provides | ||
| two levels of concurrency control to improve fairness among compression jobs running concurrently: | ||
| * Coordinator-side rate limit: TODO, depends on #2435. | ||
| * Spider-side active job limit: Controls the maximum number of jobs that can make progress | ||
| concurrently while sharing compute resources in Spider. Jobs are admitted on a first-come, | ||
| first-served basis. | ||
| * **Data integrity**: Compression jobs coordinated by `compression-coordinator` publish their | ||
| results to the rest of the system through a dedicated commit stage. The commit operation is both | ||
| transactional and idempotent. | ||
| * A job-level failure does not result in partial updates. | ||
| * Internal retries do not result in duplicate updates | ||
|
|
||
| :::{note} | ||
| In this release, `compression-coordinator` has the following functional limitations: | ||
|
|
||
| * It supports only the `clp-json` package. | ||
| * It handles only compression jobs created by `log-ingestor`. | ||
| * It supports only S3 archive output. | ||
|
|
||
| We are actively expanding the functionality of `compression-coordinator`. Additional capabilities | ||
| will be introduced in future releases as it moves toward feature parity with | ||
| `compression-scheduler`. | ||
| ::: | ||
|
|
||
| :::{note} | ||
| `compression-scheduler` is planned for deprecation and will eventually be fully replaced by | ||
| `compression-coordinator`. In this release, however, `compression-scheduler` continues to run | ||
| alongside `compression-coordinator` to handle compression jobs that `compression-coordinator` does | ||
| not yet support. | ||
| ::: | ||
|
|
||
| [spider]: https://github.com/y-scope/spider | ||
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
Oops, something went wrong.
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.
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.
@junhaoliao Can you review this section to check if it makes sense (since it compares to the existing scheduling)?