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

feat!: Drop WASM target, add Docker #50

Merged
merged 1 commit into from
Oct 4, 2024
Merged

feat!: Drop WASM target, add Docker #50

merged 1 commit into from
Oct 4, 2024

Conversation

AllexVeldman
Copy link
Owner

This removes WASM (and as a result cloudflare) as the deployment target. Instead this builds a docker container to deploy anywhere.

Tokio now takes care of the async runtime, flushing of OTLP is handled by a background task, every second, instead of every request.

The list-package endpoint's href's will now use relative paths, not sure how I missed this was an option.

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 77.43363% with 51 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/main.rs 68.70% 46 Missing ⚠️
src/otlp/log.rs 33.33% 4 Missing ⚠️
src/otlp/mod.rs 97.67% 1 Missing ⚠️
Additional details and impacted files

📢 Thoughts on this report? Let us know!

@AllexVeldman AllexVeldman force-pushed the docker branch 3 times, most recently from d469b7e to 108c7ed Compare September 28, 2024 17:58
@AllexVeldman AllexVeldman force-pushed the docker branch 2 times, most recently from 6c26ce5 to 5ef3ecf Compare September 30, 2024 13:53
@AllexVeldman
Copy link
Owner Author

Instead of Google Cloud Run, Azure Container Apps might make sense. https://azure.microsoft.com/en-us/products/container-apps#Pricing

Google free tier:
https://cloud.google.com/free/docs/free-cloud-features#cloud-run

2 million requests per month
360,000 GB-seconds of memory, 180,000 vCPU-seconds of compute time
1 GB of outbound data transfer from North America per month

Azure free tier:
https://azure.microsoft.com/en-us/products/container-apps#Pricing

The first 180,000 vCPU per second, 360,000 GiB/s, and 2 million requests each month are free.

Main benefit is that Azure allows providing an origin certificate so I can keep cloudflare in front for DDOS mitigation and CDN cache (once needed) where google can do custom domain mapping, requiring the use of the google cert or adding a load balancer in front, which does not have a free tier.

This removes WASM (and as a result cloudflare) as the deployment target.
Instead this builds a docker container to deploy anywhere.

Tokio now takes care of the async runtime, flushing of OTLP is handled
by a background task, every second, instead of every request.

The list-package endpoint's `href`'s will now use relative paths, not
sure how I missed this was an option.

The `href`'s also no longer urlencode "https://"
This prevents issues when running behind proxies that url-decode
requests before hitting our server.

The url encoding stays in place so we can locally use http instead of
https.

It can still happen that some registries are incorrectly decoded and
passed on to our server, potential problem for future me.
@AllexVeldman AllexVeldman merged commit da76e00 into main Oct 4, 2024
4 of 6 checks passed
@AllexVeldman AllexVeldman deleted the docker branch October 4, 2024 14:14
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.

1 participant