How do you scale out your webservers in FreeBSD with AWS? reddit / freebsd ---------------------------------------------------------------------- nonFungibleHuman · 2023-03-12 16:47 Coming from Linux/AWS background, I used to scale our webservers using Load Balancers in front of docker containers running in AWS Fargate. I am trying to kinda find a similar way of scaling out lightweight containers. I've been reading about jails, which would be the counterpart of docker. But I don't find info related to horizontal autoscaling with jails and AWS ALB or NLB. I mean, I know I could just use AWS Autoscaling groups with ec2 instances running freeBSD but launch time would be slower than spinning up 1 jail on a warm instance, right? Maybe I am talking nonsense, any hint towards this is appreciated. ---------------------------------------------------------------------- cubic_sq · 2023-03-12 16:53 Depends what code you are running on them ---------------------------------------------------------------------- edthesmokebeard · 2023-03-12 17:36 Jails are going to give you big jumps in capacity. The launch time for a 1core VM is probably the same as an 8core VM - but the 8 core can run more jails. There's less value in spinning up 8 1-core VMs sequentially, since you then have 8\*launchtime delays. So you'd have this M:N relationship of EC2 instances to jails, meaning you'd scale up in N-jail increments. Really the opposite of Fargate or EKS, where it's pretty linear/agile. If you have an N core machine, there's no point in running fewer than N jails. Some scriptery wouldn't be that hard to clone a jail, so you could build a setup that deploys N jails (N=cores) on any machine, then mess around with a static sized pool with a number of incremental EC2 instances that spin up as needed. ---------------------------------------------------------------------- nonFungibleHuman · 2023-03-12 18:51 Basically .jar files running servers (spring) ---------------------------------------------------------------------- 0zeronegative · 2023-03-13 13:35 Running N containers in a single instance with M cores instead of running just one container that takes advantage of M (or 0.8*M) cores per instance makes no sense unless you have some bottleneck in your code making it unable to take advantage of more than N cores. Bottom line is, so long as aws and other clouds don’t offer fargate etc for bsd you can’t do all the modern devops bells and whistles with bsd ---------------------------------------------------------------------- setwindowtext · 2023-03-13 15:29 Long story short -- there's no Fargate for BSD. ---------------------------------------------------------------------- NerdVsGeek · 2023-03-15 00:17 AWS are not going to offer Fargate for BSD because Fargate requires Docker compatibility, which BSD does not have and Linux/Windows do have. Without a standard orchestration tools that work for clusters (i.e. something like Docker Swarm/Kubernetes) FreeBSD jails, this will not happen. This is a very large scale engineering effort that would require a large number of FreeBSD developers to achieve, and I don't think the interest is there. ---------------------------------------------------------------------- nonFungibleHuman · 2023-03-16 00:09 Wow that's really sad. I wanted to learn freeBSD so much but I feel like I wont gain employable skills after learning it. ---------------------------------------------------------------------- rhavenn · 2023-03-16 15:54 Ugh, you'd probably more employable because there is no "easy" mode by having AWS do all the automation for you behind a couple of buttons / aws commands. Clicking "deploy Fargate" isn't anything hard / learning if your point is to deploy a cluster of systems and learn an OS. That's for developers who just want something to throw code into. Sure you can do this with FreeBSD, but you just need to build it yourself. Create some custom FreeBSD images that do some cloudinit stuff and write a pipeline using various scripts, ansible, etc...to deploy a VM of specific size, do some "init" stuff , push your code to a jail or just leave it running "bare metal" since you're spinning up 1 VM per app and the VM is, more or less, your jail and then add the new server to whatever load balancer "frontend" you have to start sending traffic to it. If you want multiple pieces and need to isolated then by all means use a jail and put some sort of "proxy" on VM proper to send traffic to the jails or alias IPs on the main interface. Personally, in a "everything is a VM" world from micro to 64 core monsters I never got into jails. If I need that level of isolation I just stick it in another VM and the extra deploy time isn't a big deal for me. Do the same for a "take it down" pipeline, but just remove from your load balancer and blow the VM away. So, now you just need to work on automation to monitor your VMs in Cloudwatch and come up with "triggers" to fire off your pipelines from EventBridge or something. Get that done and then you'll actually know how it works vs. "deploy fargate cluster" and any hiring manager who actually knows anything will see that as "engineering" something both at the OS level and with AWS tools. By the end you'll basically have re-created Fargate for FreeBSD. ---------------------------------------------------------------------- CoolTheCold · 2023-03-18 06:22 Freebsd tries to be sysadmin friendly, AWS tries to be [web] developer friendly, thus its not a match made in heaven and I think never will be. Knowing the fact that sysadmin breed is being extinctified, you may make your own math on how much it worth spending time learning FreeBSD vs say learning AWS tooling in terms of employable skills. ---------------------------------------------------------------------- nonFungibleHuman · 2023-03-18 11:49 This makes a lot of sense. Thanks for the honesty. ---------------------------------------------------------------------- CoolTheCold · 2023-03-18 18:01 No problem, but not sure I deserve any thanks for honesty - outside of the FreeBSD fans bubble, it's common knowledge. FreeBSD crowd still cannot see why Docker is superior to Jails, while being unable to make a example of organizing team work around FreeBSD centric solutions. Simply they stuck on sysadmins age and don't wanna accept the fact world of development has changed.