-
Notifications
You must be signed in to change notification settings - Fork 124
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
Lambda watchdog #22
Comments
i suppose for 3, api gateway could be used to launch the container, requires an extra step and is not as elegant as recognising a genuine Minecraft request though :/ |
i had a thought. what if, instead of route53 writing an error log, it fails over to an api-gateway endpoint. API gateway can check for required headers that a Minecraft client would include, if they are missing it just errors the request without invoking anything. if the headers are present it will kick off the lambda launcher. its an extra component, but more cost-effective because no lambda or container launched unnecessarily. might also be slightly less latency than an error log. |
The issue with the api gateway is that it won't listen on the minecraft listening port on the front-end, so there'd be no way to trigger it without manually hitting another URL. I'll reply to your other questions soon, still working today :) |
ah, right. and port conversion needs non-serverless components in front of it :/ |
As far as the other questions, the watchdog container does not incur any additional cost as it runs within the same task as the server container. ECS Fargate is priced by the task, and you can have multiple containers running simultaneously as part of it and pay the same cost. With respect to scaling, this is not going to increase the power levels as users are there, you'd have to preprovision cpu/memory into the task definition and also the minecraft container settings, if you want to take advantage of additional memory. You wouldn't want to run this 24/7 because it would get expensive really fast... the main benefit is that it's basically zero cost when you're not using it. For the domain, it's unlikely you'd get bot hits unless you're posting a link out there somewhere, as it's not a webpage, and it's a subdomain, not the root domain. While it's not impossible, it would be very unlikely and even then just use a slightly more complex name. |
many thanks, those are good points. Going to try and launch it this weekend and play around with it! |
Thanks, going to close this issue. As a aside, a lambda watchdog would be difficult due to needing to obtain information about the running task, as well as scheduling the firing of the lambda overall. And, since running a second container within an ECS task comes at no additional cost, it's simpler to leave the control scripts running alongside the server. |
Hi
This is a fun project :)
I have 3 questions
Could the Watchdog not run in a Lambda? triggered every 10 minutes or so by EventBridge schedule that is created by the error handling lambda (and deleted again when the container is terminated)? This should further optimise cost and make it more serverless.
This is not a scaling solution, right? it is 1 container that needs to be big enough for the expected number of users.
if the container is launched after a hit on the domain name, at some point you will get a lot of false positives from bots and such, right? is there a (serverless) way to make sure it's a Minecraft client asking for the link before launching anything?
thanks!
The text was updated successfully, but these errors were encountered: