back

by colesantiago·5y ago·view on hn ↗
What happened to "focus on the business logic / application"?

Are we just making rabbit holes out of rabbit holes of abstraction using kubernetes?

I just use and push code to Heroku and I'm done for the day, simple. NoOps I call it.

I wish more tools and platforms were like this.

6 comments
My background is in embedded, so I admittedly know extremely little about web development, but whenever I'm curious and sit down to read about microservices and containers and orchestration and all that stuff, my mind starts to numb and I can't help but conclude that 99% of companies that use it probably don't need to. And that they're just a complex way for engineers to keep themselves spinning their wheels and not actually working on an application. Like that guy who insists on doing nothing but refactoring and rearchitecting and moving things from one layer in the stack to the other, re-writing in different languages, integrating new third party libraries that do the same thing their existing third party libraries, but not actually adding anything that improves the product. How did the world get into this situation where you need all this complexity just to deploy and configure not even an application, but part of an application? Amazing!
> And that they're just a complex way for engineers to keep themselves spinning their wheels and not actually working on an application...How did the world get into this situation where you need all this complexity

Isn't this just labeling the knowledge that you don't have (and could probably read up on) as potentially unnecessary complexity?

I mean, every time I hear about embedded, I keep hearing about byte boundaries, RTOSes, compiler chains, musl, JTAG, and a million other things that make my mind numb. But I assume embedded engineers need to know all those things, because of the constraints unique to their field. Some of them could be just "a complex way for engineers to keep themselves spinning their wheels and not actually working on an application", but a lot of them provide value in the real world and solve some specific problem.

Cloud infrastructure management frameworks are the same.

Fair enough--we perceive things we're ignorant about as complex. I buy that.

I guess I was comparing it to how things were (or more precisely, how I perceived things) 20 years ago. You'd rack a server or two, install Linux, stick the application in /usr/local/bin, make sure Apache was set up, and you were off and running. Simple enough. It probably didn't scale to 2020-sized Internet user counts, though.

> You'd rack a server or two, install Linux, stick the application in /usr/local/bin, make sure Apache was set up, and you were off and running. Simple enough.

That sounds incredibly complex! :) Where would you find a place to rack a server? Are there minimum rates for such a place, or can you rack a single server for one month? Would you be able to rack it yourself? What if there was some problem with the PSU, and the server lost power when the data center was fine? What if the network card failed? What about if a hard drive in the server blew out?

Cloud infra in 2021 infrastructure has pretty turnkey answers to all of those (Kubernetes is not one for any of the ones I mentioned, except maybe for “what happens when any node goes down“). So yes, the complexity might be high, but so are the capabilities.

I mean, maybe you are running a mom-and-pop shop with a server rack in the basement for some reason, and have pretty daytime-specific hours. That's fine, and I still think you can do the server rack thing. Or at least that's the way I see it.

Perhaps one piece of meta-commentary here is that server hardware has not become substantially cheaper, faster, smaller, and easier to set up since 20 years ago. I can't really set up a server in my small bedroom that's capable of serving 10k concurrent users, and doesn't deafen me with its noise. Maybe if I did, all this cloud stuff might be less ubiquitous?

Yeah, everyone feels that way until they ran into several issues that suddenly make containerization look like a great idea.
examples?
> How did the world get into this situation where you need all this complexity just to deploy and configure not even an application, but part of an application? Amazing!

Because everyone else is doing it.

Things have gotten so complex that we need complex solutions, but w're afraid to make and own the solution ourselves because of cost, focus on core business or recruitment/knowledge concerns. So we need to find the next best open source solution to leverage the collaborative effort to reduce time and cost and have a large community to fall back on for support. And because everyone jumps on board of the same train all use cases must/will be accounted for (else the solution will fade into a niche), meaning the solutions becomes a problem in and of itself.

Repeating the cycle once again.

There's an xkcd for that.
I do work in web app development, and what you say is spot on.
I used Docker for embedded.

Running a cluster across your IOT fleet (1k+ devices; 5-10 apps each) gives a nice interface for pushing out tasks, choosing applications for a device, configuring supervisor-device relationships, etc. It turns out from scratch Docker containers on ARM are very portable.

I think you’re being dramatic — embedded is notorious for crazy builds of weird config flags to even get “hello world” to compile, and you’re waving your arms pretending that concepts from Erlang abstracted away from the language are too much.

Docker is just cgroups and namespaces, with a zip file of code. More or less literally.

Orchestration is the same mess it’s always been — back to at least the telephone days, when Erlang used the same concepts.

That sounds fascinating. Would be very interesting to read more about your IoT fleet, tasks, and deployment with that stack.
In my day, we used to just insert the server into the rack, plug it into the network, terminal into it and configure it. I'm not being sarcastic here. There was a clear correspondence between what we were doing and what it meant for the infrastructure. Now there are so many layers of abstractions that we've basically forgotten it's all just CPUs, hard disks, memory modules and network connections.
And Heroku is great for simple apps.

When you start having a lot of pieces to manage eg. cache, database, auth, multiple applications then Kubernetes comes into its own.

Because then you can scale, monitor, trace, debug, log, backup, audit, encrypt and visualise all of those pieces in exactly the same way.

And do it irrespective of which cloud you use or whether it's even in the cloud at all.

Even if your default starting stack is somewhat complex, for example, separate client and server apps, database, cache, and queue, most one-click cloud providers (ex Heroku or ElasticBeanstalk) offer ways of unifying logs, monitoring, simple provisioning, etc. You are “locked-in” in that you can’t move to another provider within an hour, but the lock-in would still be very low, you can use generic technologies (ex: Memcached or Redis) and have an impact only on a few config files...

I’m not telling people what to do, if you like K8s or Docker or what have you knock yourself out, and I mean it. For example, people keep telling other people on HN not to use React and that’s a hill I’d die on - and could write a dissertation defending it. I’m just wondering what the dev experiences of others are so I may learn from them.

Looking at the istio-linkerd-traefik-consul-whatever-the-heck mess of cloud-native ecosystem projects, I want to decree that backend engineers are no longer allowed to make fun of Javascript engineers for having too many frameworks anymore.
Not a good analogy.

All the tools you mention are not integrated into your app neither change how you write code. In fact your application shouldn't even know what service mesh you are using.

I can write a back end application once and then have it run with istio/linkerd/traefik/whatever with zero code changes.

That doesn't happen in the Javascript world. The choice of framework directly affects your code.

Mind blowing to me that "Heroku but with docker images" doesn't seem to exist. Would love to be corrected!
Heroku does allow building / deploying Docker images - https://devcenter.heroku.com/categories/deploying-with-docke...
Azure AppService has some pretty good support for that.

https://azure.microsoft.com/en-us/services/app-service/conta...

That's pretty much Cloud Run, no?

https://cloud.google.com/run/

I'm looking for something like that, but I'm afraid of using any google developer services, such as GCP, for personal projects. What if I breach their TOS somehow and get banned, or what if I didn't breach their TOS and still get banned?

Can't afford to test my luck until I've finished migrating all my accounts off my gmail.

Why don't you just create a new Google Account specifically for this?
Associated account bans are a thing in the Android world. I don't know if this extends to other Google platforms.
I'd also need a new credit card, I'm pretty sure they link accounts via shared CC. And even then, I'm pretty sure they still link accounts via other means. Did I link my gcp email in my android gmail app? Did I use the same IP address for both accounts? Or any of the thousand ways google has to know two accounts belong to the same person.

Honestly, creating a second google account might itself increase the chances of getting banned. Nobody knows with Google, and that's the problem.

Doesn't that require another active SIM card?
I'm using my main google account on GCP and just yesterday started to take precautions about this.

I created a new google account with no relation to my main one and added it as an owner to my GCP project, so hopefully in the event of either account being banned I can still access everything.

Cloud run is great. I'm using an Nginx image to serve my static website. However, if I remember correctly, you can only respond to HTTP(S). So though it may be enough for most usecases, it is not essentially equal to running any container on the cloud.
Websockets now work on cloud run. We implemented that last month. Cloud run does have a few limitations: no service discovery built in, no docker compose support, limited set options for CPU/memory, no persistent disk, etc. But it's great for things like a simple Spring Boot server or any kind of stateless service. But you won't be running redis or a database there. It's just not designed to do that. It's also not great for running batch jobs; we tried and our jobs kept getting killed/throttled. Use a vm for that.

Luckily, there are lots of other Google services for that that you can plugin for that sort of stuff. Cloudrun is great if you are planning to use those things.

Kubernetes is what you use when you want to mix stateful and stateless stuff so you can avoid depending on those services. That makes sense if you need to support multiple clouds or on premise installations. But otherwise, it's a lot of extra complexity and devops even before you consider the overhead of managing the kubernetes cluster. There are lots of companies that talk themselves into needing this where the need is arguably a bit aspirational. I've been on more than one expensive project where we served absolutely no traffic at all with hundreds of dollars worth of kubernetes clusters idling for months on end that had no realistic hopes of ever getting more than a very modest amount of traffic even if everything worked out as they planned.

websocket support: awesome ! have been waiting for that ! :)
gRPC and WebSockets are in preview. Doesn't look like you can use arbitrary ports though.

https://cloud.google.com/run/docs/triggering/grpc

You can open just 1 https port but you can map whatever port in your docker container to that. Some websocket implementations work with a second port and that just doesn't work. But you should probably split those services into two. But if you use something that can mix websockets and normal https traffic over 1 port, it works great.
For my usage (lightweight game servers), I need WebSockets, which are still in beta and they currently force WS connections to close after 1 hour, which is a dealbreaker for me.
Dokku is "it" for me, but I'm sure there are others. Works pretty well, but it's (to the best of my knowledge) for one node only.
It is coming. Check https://www.qovery.com/ and https://www.hyscale.io/

(Not affiliated with either)

Think thats AWS Fargate, but admittedly i don't do a lot with Heroku.
CloudFoundry has ability to host your own docker images easily AFAIK.

Edit: fixed name

Digital Ocean's App Platform can work this way.
Dokku looks super cool but it's still a lot more involved than Heroku. Heroku doesn't make you think about provisioning servers, updating infrastructure, or manually setting up common integrations like backups and logging.

Just to illustrate the point, dokku's docs[0] for logging say "Warning: The default docker-local scheduler will "store" these until the next deploy or until the old containers are garbage collected - whichever runs first. If you require the logs beyond this point in time, please ship the logs to a centralized log server."

Alright, well, that's gonna be a whole lot more work than two click in Heroku to send all my logs to any logging provider of my choice.

[0] https://dokku.com/docs/deployment/logs/

render.com
> I just use and push code to Heroku and I'm done for the day, simple. NoOps I call it.

I just enter my Honda Civic and drive to my office. Simple. I call it "Sedan".

(Honda Civic driver looking at an 18-wheeler in the highway and not understanding why somebody would use that)

In all seriousness though, Kubernetes solves a specific set of problems. Just because you personally don't have these problems, doesn't mean that Kubernetes is bad, or that people who use it, don't need it.