Cameronsplaze / AWS-ContainerManager

CDK Architecture to spin up containers when you connect, and back down afterwards automatically.
2 stars 0 forks source link

[Optimization] Look into if it's worth switching some/most of watchdog to use ec2 networking metrics #21

Open Cameronsplaze opened 1 month ago

Cameronsplaze commented 1 month ago

Is your feature request related to a problem? Please describe. Right now, the watchdog works by running SSM commands on the host w/ lambda, and pushing the results to custom metrics. If you look in the console, there's already ec2 metrics you can use and filter by autoscaling group. (CloudWatch Metrics => EC2 => By Auto Scaling Group => <ASG Name>. Then check NetworkIn and NetworkOut. We can add these two together w/ metric math too).

I don't think we can get rid of the lambda, so is it worth it? (I don't want the container to spin down if someone is ssh'd in, but I'd be surprised if ssh showed much traffic at all. Worth looking into though.).


To get farther, I need to spin up minecraft/valheim instances, and see what the metrics look like both with/without players connected. Test the following:

Describe the solution you'd like If this makes the architecture simpler/cheaper, do it.

Describe alternatives you've considered The current way the architecture is now.

Additional context N/A