-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement healthcheck endpoint for Lightsail #8
Conversation
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.
Could also consider pulling in something like warp
and just doing
#[tokio::main]
async fn main() {
// GET /hello/warp => 200 OK with body "Hello, warp!"
let hello = warp::path!("hello" / String)
.map(|name| format!("Hello, {}!", name));
warp::serve(hello)
.run(([127, 0, 0, 1], 3030))
.await;
}
.await | ||
.expect("Failed to start HTTP server"); | ||
}); | ||
futures::future::join_all(vec![app_handle, http_handle]).await; |
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.
also i think its very possible for the app to crash but this will wait forever for the http server to also stop, so perhaps not the best health check
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.
Yeah it's not really a good healthcheck, but Lightsail just needs a http endpoint on the service
Opened https://linear.app/dotkom/issue/DOT-696/reconfigure-tracing-subscriber-log-levels for tracking tracing levels |
Could maybe use a proper http framework, but we just need to return a valid http message for AWS Lightsail recognize a healthy service.
Maybe in the future we can actually health-check the Slack websocket connection in this?