Skip to content
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

Measure image spin-up time on providers #7

Open
cryptobench opened this issue Feb 2, 2024 · 0 comments
Open

Measure image spin-up time on providers #7

cryptobench opened this issue Feb 2, 2024 · 0 comments

Comments

@cryptobench
Copy link
Member

cryptobench commented Feb 2, 2024

Task: Create JS SDK Script for Estimating Provider's Download Speed and Image Spin-Up Verification

Description

We need a JavaScript SDK script capable of estimating a provider's download speed and verifying the ability to spin up an image. This script's goal is to help us estimate a provider's download speed and in general capability of spinning up certain images of different sizes.

Requirements

  • Image Spin-Up Verification: The script should verify if the provider has successfully spun up the image or if the operation has failed.
  • HTTP POST Request: For each result (successful or failed image spin-up), the script must send a POST request to our backend at http://django:8002/v1/image-spinup.
  • JSON Data Structure: The POST request should contain JSON data with the following structure:
    • imageTag: The tag of the image being tested.
    • deployed: A boolean value (true for success, false for error).
    • provider_id: The unique ID of the provider being tested.
    • cost: We want to track the actual cost of doing this.
    • downloadStart: The timestamp when the provider started downloading the image
    • downloadFinish: The timestamp when the provider finished downloading the image and its now ready to compute on.

Script Parameters

  • --provider_id: This parameter accepts the provider's ID for testing. The script should employ a market strategy to compute exclusively on this specified provider.
  • --image: This parameter is for the imageTag to test with.

In my other benchmark example I used the code const URL = process.env.DOCKER === "true" ? "django:8002" : "api.localhost" so that I could also just spin up the docker swarm and then run the script manually on my host, rather than relying on the task being scheduled by our scheduler in the cluster. This might be of use to you too.

@cryptobench cryptobench converted this from a draft issue Feb 2, 2024
@pgrzy-golem pgrzy-golem moved this from Todo to In Progress in Reputation system Feb 9, 2024
@cryptobench cryptobench moved this from In Progress to Done in Reputation system Feb 16, 2024
@cryptobench cryptobench moved this from Done to In Progress in Reputation system Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant