That sounds so spot on.
We do have a choice though. Static HTML, server-side templating, vertical scaling and /var/log still exist and work just fine. We don’t need to adopt the newfangled techniques unless the use case calls for them.
That sounds so spot on.
We do have a choice though. Static HTML, server-side templating, vertical scaling and /var/log still exist and work just fine. We don’t need to adopt the newfangled techniques unless the use case calls for them.
Then the answer is something like this.
* nginx
* Java
* Macroservice architecture
* Vertical scaling
* Server-side rendering
* Minimal javascript, no session cookies. These things bump the cost of each page-load.
* /var/log with relatively sparse logging in the sunny day path
Like this is a pretty strict design philosophy. You can probably do more JS and front-end stuff than I do, but it should be understood it's not free. My page loads incur for the most part a single request each. There are websites where each page load incurs hundreds of requests. It's worth repeating: Back-end requests are not free. They are cheap, but they are not free. When you have a dozen users and they incur a few thousand requests, that may be within what your server can deal with. When you have a thousand users and they incur hundreds of thousands of requests, it's probably not as fine.
Even (or maybe especially?) popular products like Gmail are guilty of this, sending easily over 200 requests. That's 700ms(!) worth of stalled requests in the best case scenario.
Context switching is expensive.
Struggling with this because even in a small app in a Linode box, I don't mind just cp-ing my bins but there's always other things/versions they need. Thinking of bringing in Ansible to help me out here.
Deploying feels easier in the container, Kubernetes world
All it is basically doing is a git pull, symlinking in the vendor code (gem) cache, doing all the rails preflight ceremony, and updating a "current release" symlink to point at the new folder. Oh and it restarts the servers (nginx, rails).
At a previous job I had an 8-line shell-script that did almost the same thing and it worked for years.
I have a dist-directory, in it is a directory for with each release version, and a symlink current pointing to the current release. To deploy a new version, I create a new directory, unpack each service, and then redirect the symlink ... then "systemctl restart service-name".
You got rid of a lot but where did the functionality for those tools go? I understand wanting to get rid of containers & Kubernetes, but did you rewrite/bake the functionality in to your app? or maybe not care about monitoring and logs temporarily for now?
Kubernetes and the surrounding ecosystem can create many of the problems they set out to solve.
I took the choice: to run from the web with my hair on fire, screaming.
Towards embedded, where none of this matters, and where the crux of the whole thing is really, really important: its the atoms, then the electrons...
We don't need the web if the user holds our interface in their hands. Surprisingly enough, the web holds an iron grip on that face/phone interface, but .. one easy solution to all the cruft, is simply return to the roots.
Yes, this requires hardware production capabilities. Its not for everyone, then.
But I tell you, 40 years into this industry, it was so refreshing to abandon all of the fancy front-end stuff and just get straight down to the embedded realm. Nothing nicer than having the machine - and the user - all to oneself.
Of course, this edge case gets discussed further in the article, but that is just one of a few things this old-timer could say about what went wrong with programming culture... (*cough* *cough*..should never have removed the compiler..*cough* *cough*.. this opened the door for all the weirdos to take over what should've stayed in the OS .. *cough*)
But, be careful, its requires just as much rigour as any other market. Perhaps more so, in some ways. Tooling and methodology are a lot more important ..
It is just so, so much simpler to debug and trace what's going on. It can handle a surprising amount of traffic and work before any actual issues come up. Nothing changes from an upstream vendor, at all. It really "just works".
That said, I'm very aware there's a sweet spot and that this doesn't work past a certain point. I just think that point is so far beyond where most people actually get.
A simple make file and maybe a load balancer can easily let you launch large web applications used by millions of users.
I do not understand where people are getting stuck here that they need all of this complexity.
How many users do these apps have?
When I started my current job, the project was veering into microservices hell by a team that did not understand how to build a web application. A rough back of envelope calculation of potential customer base and what the product was aimed at (B2B in renewables) told me that even with world domination, the backend of the application would at most have 50k active users ever. So we didn’t really need 30 different microservices all which could scale independently, maybe just 2 or 3 larger services.
10 microservices to support a 2 page static html webpage.
We "needed" microservices for "Scalability", but we will never have more than a few hundred users at a time.
We can't have simple logging of our services, because all logs have to go to Loki, and Loki only does full text search. So first, learn how to query with Grafana's querying language in order to do any searches at all, then figure out what you will ever need to search, and turn that into a prometheus metric, but wait, now we have to properly compose our metrics for queryability....
I need to implement retry logic in one of my microservices. Would be easily implementable with an Amazon SQS or RabbitMQ queue. But we can't have queues, because they aren't stateless. We need to use Kafka because it has the ability to scale to billions of events, never mind that we never see more than 10k events in a 24 hour period. So now we'll need to write custom logic for retries and managing state outside of the queue, which means we're back to using database tables, which means there's no point to using kafka to begin with for our application...
Our services build in gitlab to docker images which then are hosted in the cloud and managed by k8s in custom vpcs. Sure, makes sense. But also, can someone show me how the developers on the team are supposed to be able to run the system locally? What? Can't do it? Replicating the production environment for local builds is now too heavy a lift and has been deprioritized by management? So how are they supposed to develop again? Oh, they'll just never learn how the whole system works, and continuously make changes they assume are isolated to their specific microservice without realizing they've introduced an error into the wider system unless the lead/manager catch it? Got it.
I could go on. Architects choosing technologies over listening to their engineers, in order to pad their resumes with technologies that look good to other architects. Committees of middle-managers choosing the 'safe' enterprise technologies instead of what is actually needed.
There aren't that many projects that have "millions" of users.
This sounds way too specific to be a hypothetical
Knowing docker these days is a huge boon - it immediately removes the "works on my machine" problem, and honestly the amount of docker knowledge required to deploy a basic even crud app is about 10 lines that can be copy and pasted from stack overflow by searching for "Dockerfile for X"
(Never bothered figuring out why since the script ran fine on its own and was replaced with a proper application shortly thereafter.)
Is that a good tradeoff? I don't know; it seems to me you can get 95% of what Docker gives you with 5% of the complexity. Luckily the ecosystem has started to realize that and better tools have started to materialize.
There are other tools too, such as containerd (and more I don't recall the name of first-hand), but I don't have first-hand experience with them.