MRSK: Deploy web apps anywhere
mrsk.dev
mrsk.dev
I’m gearing up to deploy a Nextjs project in the next few months and while I appreciate the claims of Function this and Edge that, I feel infinitely more comfortable with a couple small server instances, especially early on when my focus should be testing my product, not optimizing my cloud infrastructure for scale that might never be needed. I’m excited to give MRSK a shot and feel grateful to live in a time when there are so many good choices.
Not to mention vendor lock in, something that really needs to be talked about more with this new wave of function this and edge that.
In the past decade I’ve been on several teams that went out of their way to avoid vendor lock-in by refusing to use platform service offerings.
Every single time it was a complete waste of time. We could have saved a lot of time by embracing platform offerings and then trying to port to a different vendor only if necessary.
Howvever, there are many companies working within heavily regulated sectors that unfortunately need to be able to evidence a rapid ability to switch platforms AND exactly where data is stored and processed.
As such using very specific offerings in cloud providers is unfortunately not always an option. Something that is portable, even at expense of complexity or available dev time, becomes a non negotiable.
There are significant downsides to a lot of the vendor offerings, they seem like a simpler solution but they are plenty complicated in their own right. Particularly since they are probably built to accommodate varied and complex cases that you don't really need. And rarely is this paired away under some special dialog for power users, often you are expected to just know everything up front.
> not optimizing my cloud infrastructure for scale that might never be needed
I don't understand why you would want a load balancer with that mentality. Feels like most companies will never reach a scale where load balancing is necessary.
sure the DB might still be a single point of failure as is the load balancer, but some rogue web processes hogging your single server or a disk failure bringing it down
Our LB does a bunch of heavy lifting for us. It handles SSL termination, static routing (we serve a bunch of content from S3), handles Auth for our internal "management" endpoints, and because we use containers it gives us health checks, auto restarts, and rolling deploys. I'm pretty sure we have about 30lines of terraform to support all of that.
In that case, go with managed services like render, Heroku, or fly. MRSK, or any DIY deployment, is not going to save you the hours of tinkering you will inevitably do to get the non-server stuff up for even a low-usage production app: 1. One-click Deploys, basic CI/CD 2. Redis/memcache 3. Database / migrations / rollback / backup 4. Logging / metrics / down detection & basic high availability 5. Keeping up with basic upgrades
Soon as I have a couple of little home servers in place I think this will be a solid model for me.
37signals is part of a contingent of reactionary developers and you can see this in HEY and now MRSK. It's reactionary without delivering real innovative value.
Fully agree that 37Signals’ products are very opinionated and often missing crucial features. I can see that they fulfil some use-cases, but could be more mainstream.
I’d love to see OP do anything as remotely influential in the industry as DHH.
I vastly prefer their appeal to standards over your appeal to authority.
But no such differences are captured by calling one appeal to authority 'an appeal to authority' in contradistinction to another.
37signals and DHH did a lot right with Rails, so I'm looking forward to trying their approach on deployment.
IMO kubernetes is quite a lot of moving pieces that are absolutely not needed for most deployments, if you like it great! I'm sure many will love the opinions guiding MRSK (myself included).
I personally wouldn't touch K8s but I'm also not telling anyone not to try it.
(I have nothing to do with the company, just a happy client)
But claiming their text editor to be best in class when it is literal dogshit is brave.
They solve problems by breaking them into first principles and composing them into shapes that fit them.
They've created RoR which at the time brought together with textmate millions of developers onto mac and "programming can be actually pleasant and cool" side. Their hero style page was copied everywhere on the internet which is visible to this day.
Many unicorns grew from RoR, many use it to this day.
They are open source advocates.
They create environment of certain kind of skepticism towards established tech while injecting novel approaches here and there.
You're saying something about inline code highlighting and jumping onto shitting over whole company and saying something about kubernetes.
It's hard to take it seriously even if you have a point there that some functionality is embarrassingly missing in one of their products.
I don't really see people refer to them as the cream of the crop. Basecamp's UX is opinionated but still complicated: I get lost on it even though it's a simple product. It seems to work well for a team more similar to 37signals'.
Hey.com I haven't seen take the world by storm, even though it does seem better than most e-mail software (and I do appreciate their technological solutions on it). I guess most people don't have that problem with e-mail that the Basecamp founders do.
That's a bit of a trend for them: they often claim people should do one thing and everything else is worse, even though that one thing really works for them and might not work for anyone else. Their agile methodology, their team size, their tech stack, etc. they often pose themselves as the "sane" ones doing it simple and easy, while everyone else is chasing the wrong thing.
So in that sense I can see why OP said they're reactionary. I would disagree, however, as they've been revolutionary on many fronts, but it's usually as part of a contrarian view that sometimes is more of a miss than a hit.
So human-being focused a third of their human-being employees quit after the CEO wrote a blog post! https://www.theverge.com/2021/4/30/22412714/basecamp-employe...
It is human-focused to not pussyfoot around such decisions but to instead bring clarity to the table and allow humans to make their choice.
More companies should be like that and, in fact, in Europe, still are.
> It is human-focused
Human-focused, as long as the human is white and male.
When you make a communications service, you probably want to involve a wide range of perspectives to make sure you build a good product that doesn't contribute harm. Specifically with Hey, they've walked back a bunch of features (props for being reactive, I guess) after they got a modicum of feedback from people that don't look like the two founders.
- https://twitter.com/dhh/status/1275991097261449216
"This is a great and important perspective we hadn’t considered" is a stunning example - You don't need to (and can't!) personally consider every perspective, but maybe if you involved more people in the product development process you get to catch these things before you release them. Human-focused.
Feels a bit surreal seeing a 'tool' that wraps Traefik + Docker Swarm be so self-aggrandizing.
OK to each their own.
Do you object to YAML? Kubelet?
It seems like a pretty solid approach to me. Some have been misdirected by it because something that uses a sizable fraction of a CPU doesn't work for their use case, but that speaks more to the lack of an alternative to Docker Compose, which Kubernetes wasn't intended to be.
Kubernetes is 'fine' in the sense that a sledgehammer can, technically, open a door...
Syntax highlighting would be nice. They started their open source text editor before there were many good alternatives but didn't set themselves up to accept contributions. They lost the main two developers of it in the drama last year. Now that CKEditor 5 is out, they should probably switch to that...
So is Apple, and it seems to work for them.
I can see using this to deploy on DO or Hetzner to save a few bucks vs Render or Amplify- but on bare metal you're giving up a pretty amazing ecosystem these days. Ie. if you want to run stateful things like databases, logging/monitoring, NFS, object storage, persistent disks, complex networking, etc it's going to be miles easier to manage that w/ k8s. Even for that bare-metal/vm-partitioning goal above, there is a k8s runtime (kata-containers) which will automatically run containers on lightweight vms and handle all the plumbing to and from K8s. Plus if your mid-size SaaS wants to sell to the whales you're going to need compliance and security best practices that are much easier to implement and enforce w/ k8s. Finally, there are also lighter weight distributions these days to make it less painful to run yourself.
That said, I do appreciate the 37signals philosophy of having such strong opinions they craft their own tools and I also applaud leaving the cloud for bare metal. Even if you need the burst capacity you can provision your base-load on bare-metal and burst to the cloud when needed.
Regarding logging, object storage, how does kubernetes help? You'll have to implement these regardless of the underlying container infra.
The switching to live containers and proxy integration seems like table stakes these days. Is traefik that much better than nginx in all cases?
And, dokku just works with almost any kind of web app (regardless of the language) i throw at it. It's amazing for just git cloning something, create a dokku app and new git remote and then just push and see if it works, which it does almost all the time. It's super fun to experiment with something new and just see what happens.
Is the issue that you only need to `gem install mrsk` locally vs running our bootstrap script to install Dokku on a remote server? I'm not sure what the difference is maintenance-wise between Dokku and MRSK, as at the end of the day you still have a server you need to maintain/upgrade for both products.
also fubdamentally dokku is single server whereas MRSK is multi-server. not that I need that but worth pointing out as a difference
I'd love to hear more about the issues you've faced, even if you're not using Dokku anymore. It helps me improve the project for others.
Regarding multi-server support, we support Kubernetes and Nomad for job scheduling - and have for years - which I think should make us multi-server capable. Are you looking for something else?
For anyone wondering, Dokku supports Traefik in addition to Nginx, as well as Caddy and Haproxy.
Of course you need full-time admins to babysit your bare-metal Kubernetes clusters. But if you're running bare metal, you made the financial decision that (cost of full-time InfraOps Engineers + cost of bare-metal servers <<< cost of IaaS cloud). So you're already paying for full-time InfraOpEng. In this day and age, is it really reasonable not to expect them to know Kubernetes cluster management as well?
Far too few people know about it IMO
Though that is probably why - Traefik is popular for self-hosting, while Caddy is more generally mainstream.
Traefik is absolutely amazing! And it seems like in the development community every wants to use nginx. But in my experience traefik is absolutely perfect for proxying with container deployed applications.
It also really depends on what you want out of the proxy.
Probably makes sense to try caddy first for simpler use cases and graduate to traefik if you find some features you want to have (like l4 traffic that isn’t alpha:beta)
[1] https://github.com/traefik/traefik "Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy. Traefik integrates with your existing infrastructure components (Docker, Swarm mode, Kubernetes, Consul, Etcd, Rancher v2, Amazon ECS, ...) and configures itself automatically and dynamically. Pointing Traefik at your orchestrator should be the only configuration step you need."
Traefik was much more ram hungry than nginx, and iirc Caddy as well (at least 2 goroutines per conn). It’s probably fine (and worth it) for the vast majority of request-response web apps, but all of these extra layers have a cost. And that’s still nothing compared to the overhead of say k8s with all bells and whistles.
Anyway, as someone who’s been out of the loop on backend for many years, I am quite shocked at the level of resource waste, even among the projects with a strong reputation. You always hear the complaints about frontend bloat, but these days backend seem to have caught up.
That said I definitely believe your characterization of resource hunger between nginx and traefik.
You are the second person to mention using websockets for requests in as many days… How do you deal with scale out? Sticky cookie routing seems like almost a requirement if you don’t want to deploy a redis-alike.
Also just out of curiosity, do you use hyper-express[0]?
All I want is something like the following:
- Sandboxed applications
- With an agent to control which ones run on a machine
- A GUI to easily observe and manage deployments
- Infra-as-code using a sensible file format (anything but YAML)
I imagine this working best with VM-based runtimes like .NET and WASM. The ability to control resources consumption isn't there yet, but I don't see why you couldn't have a runtime that gives fine-grained controls over sandboxing and resource consumption.
This idea came about from observing discourse on replacing conventional hypervisors with WASM/WASI.
Forget Docker. Forget OCI. Forget Kubernetes/SWARM. We just need a simple system for orchestrating apps that are already VMs.
kind of hipster?
That info has to live somewhere, and in the same repo as the code doesn't sound that bad.
Their focus is not on serverless-cloud-native-infinite-scaling.
It supports similar usecase but Nomad is more mature, activelly improved, supports non-docker environments and is cross-platform.
Do you plan to be doing this job for the next 10 years? Then set aside the time to learn system tools and scripting. The time investment, however long it takes, will pay itself off many times over, guaranteed.
Yes you can glue things together with existing stuff. Let's not pretend that cgroups+namespaces+dnsmasq (or whatever) tech is actually a better solution. It might be "simple" via some metric, but it's yet another ad-hoc piece of engineering that has to be understood and maintained.
I've seen this at a former job, and it was an absolutely horrible idea.
I'd be open to something truly simple (Nomad perhaps?) over K8S in some scenarios, but if I'm going to take a gamble, it's going to have to be a lot simpler to provide enough benefit on taking a chance on a less popular piece of tech.
edit: after looking a bit closer, I think it’s a bit misleading to call what this is doing “zero downtime”. as far as I can tell, your services are essentially going to be unresponsive until they start, which can be brutal for slow starting ones (and that’s assuming they start successfully)
https://github.com/mikew/b3cmd-server
https://github.com/mikew/b3cmd
This used docker-compose + git.
I see there is support for ‘accessories’ such as Redis. What if I only want to deploy an image and skip building a Dockerfile and pushing it to a registry?
I agree, there should be a way to have the primary app be an image that doesn’t get built/pushed.
Also here is the MRSK introduction blog post: https://world.hey.com/dhh/introducing-mrsk-9330a267
I wonder how much (if any) of this landing page was GPT generated.
If you are dynamically allocating host servers and needing to register them with the LB you should probably consider K8s?
This is designed for a “more stable” world:
Have some hosts. Have an LB. Deploy containers to those hosts. Avoid superfluous k8s complexity that you don’t need.
anyone know a similiar tool?
https://www.docker.com/blog/how-to-deploy-on-remote-docker-h...
https://stackoverflow.com/a/71194294 https://docs.docker.com/compose/production/
I think it’s important to remember that MRSK is a bare metal department tool and not really designed for the cloud, as per the creators’ statements. https://world.hey.com/dhh/why-we-re-leaving-the-cloud-654b47...
Really painful to manually call a docker container from systemd normally, lots of edge cases to manage
Would this make my workflow obsolete or easier?
Maersk will be in touch to gently ask that MRSK desist using their trademark.
THAT said, I'm not sure I personally would take the gamble!
gem install mrsk
"""
you lost me right in there.