+ Cons section

* closing thoughts section is planned but not done yet
This commit is contained in:
shockrah 2021-07-18 22:35:19 -07:00
parent 5bfe5994b1
commit edc304b5d4

View File

@ -1,4 +1,4 @@
# Lewdlad the Cronjob that became a bot and orchestrates AWS Instances
# Lewdlad: the little Chronjob that could
## What is "Lewdlad"
@ -74,10 +74,9 @@ The new architecture has a few goals in mind:
* More flexibility
![](/media/img/lewdlad/arch.svg)
The text version of this goes like this:
With this new architecture:
* Lewdlad lives on its own virtual private server
@ -94,3 +93,32 @@ The text version of this goes like this:
* Elastic IP's are cheap as hell per month
* Lots of free logging services that I could technically even host my self.
### Cons
* More complexity, more problems
* Maintenance requires more planning since there's more _moving parts_ than a single server
* Bot commands are way slower since because...:
* Lewdlad has to go through an API Gateway
* That gateway then has to talk to Lambda
* Finally lambda has to (probably) go through several internal AWS services to reach the EC2 instances
* Game services are located literally everywhere(Oregon, L.A., Chicago etc.)
With the tech out of the way here's the _real_ reason why I did this.
The advantages of Light sail during the "on-season" periods of high traffic are not worth the cost during the "off-season" when there's no traffic.
This new setup allows me to have instances which can be elastically started/stopped based on their usage which in turn reduces monthly cost.
Regular stoppages can also be configured either from Lambda's side or from an EC2 instance, if we don't want to risk going over the 1000 request quota.
## Closing Thoughts and Remarks
Apart from Freechat, Lewdlad is easily my favorite project to build out.
It's one of those things hasn't been very complex to actually build out but has definitely been the most visceral.