10 ms·
You want microservices, but do you need them?
- p1necone 10mo agoI like goldilocks services, as big or as small as actually makes sense for your domain/resource considerations, usually no single http endpoint services in sight.
- cogman10 10mo agoOnce upon a time, that's what a microservice was. A monolith was the company's software all in one software package. I think what changed things is FAAS came along and people started describing nanoservices as microservices which created really dumb decisions. I've worked on a true monolith and it wasn't fun. Having your change rolled back because another team made a mistake and it was hard to isolate the two changes was really rough.
- eternityforest 10mo agoI don't want microservices, I think what I really want is self contained WebAssembly modules!
- rao-v 10mo agoUnironically this
- kaladin-jasnah 10mo agoWhat's the performance trade-off of something like this over containerization? I have heard of an operating system that runs WASM (https://github.com/JonasKruckenberg/k23 https://github.com/JonasKruckenberg/k23).
- ethanwillis 10mo agohighly depends on the wasm runtime we're running things on. I haven't seen any good recent benchmarks (as in the past few years). But, if I remember right wasmer is putting together some and trying to automate the results for them.
- honkycat 10mo agoThe one thing I would like to preserve from microservices is stuff about database table hygiene. Large, shared database tables have been a huge issue in the last few jobs that I have had, and they are incredibly labor intensive to fix.
- devmor 10mo agoI feel that if you have multiple sets of application logic that need to access the same data, there should be an internal API between them and the database that keeps that access to spec.
- fny 10mo agoA databases is a global variable in disguise.
- davnicwil 10mo agoIn my experience basically everything being good in software is downstream of good data modelling. It's partly why I've realised more over time that learning computer science fundamentals actually ends up being super valuable. I'm not talking about anything particularly deep either, just the very fundamentals you might come across in year one or two of a degree. It sort of hooks back in over time as you discover that these people decades ago really got it and all you're really doing as a software engineer is rediscovering these lessons yourself, basically by thinking there's a better way, trying it, seeing it's not better, but noticing the fundamentals that are either being encouraged or violated and pulling just those back out into a simpler model. I feel like that's mostly what's happened with the swing over into microservices and the swing back into monoliths, pulling some of the fundamentals encouraged by microservices back into monolith land but discarding all the other complexities that don't add anything.
- cyberax 10mo agoI don't want microservices! What I want is a lightweight infrastructure for macro-services. I want something to handle the user and machine-to-machine authentication (and maybe authorization). I don't WANT the usual K8s virtual network for that, just an easy-to-use module inside the service itself. You should be able to spin up everything localy in a docker-compose container.
- LaurensBER 10mo ago> What I want is a lightweight infrastructure for macro-services. I want something to handle the user and machine-to-machine authentication (and maybe authorization). > I don't WANT the usual K8s virtual network for that, just an easy-to-use module inside the service itself. K8s makes sense if you have a dedicated team (or atleast engineer) and if you really need need the advanced stuff (blue/green deployments, scaling, etc). Once it's properly setup it's actually a very pleasant platform. If you don't need that Docker (or preferable Podman) is indeed the way to go. You can actually go quite far with a VPS or a dedicated server these day. By the time you outgrow the most expensive server you can (reasonable) buy you can probably afford the staff to roll out a "big boy" infrastructure.
- cyberax 10mo agoI tried to use K8s several times, and I just can't make it work. It's fine as a deployment platform, but I just can't justify its complexity for local development. We're using Docker/Podman with docker-compose for local development, and I can spin up our entire stack in seconds locally. I can attach a debugger to any component, or pull it out of the Docker and just run it inside my IDE. I even have an optional local Uptrace installation for OTEL observability testing. My problem is that our deployment infrastructure is different. So I need to maintain two sets of descriptions of our services. I'd love a solution that would unify them, but so far nothing...
- fragmede 10mo agoTilt? Skaffold? configuration isn't free, but a debugger on a local k8 cluster that's at least somewhat representative of prod is pretty handy once you do.
- dzonga 10mo agomicroservices were an effect of the ZIRP era. you literally have places like Monzo bragging that they've 3 microservices for each engineer. 3 tier architecture proves time and time again to be robust for most workloads.
- LaurensBER 10mo ago1 micro-service per pizza sized team seems to work pretty well. Put it into a monorepo so the other teams have visibility in what is going on and can create PRs if needed.
- LtWorf 10mo agoUh? You eat less than a pizza per person?
- hackpelican 10mo ago8x engineer
- SiempreViernes 10mo agoTo be fair pizzas are quite easy to scale from small kid sizes up to enough for several persons. But it is a bit sad that the poster apparently never bought a pizza just for themselves.
- LaurensBER 10mo agoIt's a reference to Amazon's statement that teams should never grow larger than a team that you can feed with 2 (large) pizza's. The optimum is probably closer to 1 than to 2.
- Uvix 10mo agoCertainly no more than three tiers. "Traditional" three-tier, where you have a web server talking to an application server talking to a database server, seems like overkill; I'd get rid of the separate application tier. If your tiers are browser, web API server, database: then three tiers still makes sense.
- callamdelaney 10mo agoUsually no
- the__alchemist 10mo agoOn the theme of several other responders: I don't want microservices; I want an executable. Memory is shared directly, and the IDE and compiler know about the whole system by virtue of it being integrated.
- ErroneousBosh 10mo agoI love the idea that I can compile all my functionality including HTML templates, javascript, and CSS into a single albeit huge Golang binary. I have never done this yet. But I love the idea of it.
- SatvikBeri 10mo agoI loved uberjars back when I was writing Scala. I don't miss much about the JVM, but I really miss having a single executable I could just upload and run without having to pay attention to the environment on the host machine.
- cogman10 10mo agoThat's essentially the role docker serves now. Everything you need to run in 1 single image.
- SatvikBeri 10mo agoYeah, but building a docker image tends to be a lot heavier weight and slower, in my experience, than uploading a single jar
- cogman10 10mo agoHeavier weight? Yes. Slower? Should be the same performance. Unless you are on a non-linux host, then there is no docker penalty. The only time I can think where a JVM might be faster is if you have a multi-tenant setup. In that case, the JVM can be more effective with the GC vs having multiple JVMs running.
- vb-8448 10mo agoin my opinion "you need microservices" peaked around 2018-2019 ... does nowadays someone think that, apart from when you reach certain limits and specific contexts, they are a good idea?
- soco 10mo agoHalf of the jobs I'm applying to have microservices in the description, much more often than, say, REST or Boot, so somebody definitely thinks they're a general solution to something.
- Nextgrid 10mo agoMicroservices is an excellent generator for developer busywork and increased headcount. Busywork benefits the developers, increased headcount benefits their manager, and so on.
- vb-8448 10mo agoI went through some interviews where they put microservices in the job description but when asked it turned out to be a kind of monolith for core + a set of other services for other stuff (authentication, logging, analytics).
- lysace 10mo agoWe've removed/merged most of the unnecessary services. The ones left have operational needs to stay separate. The current hell is x years of undisciplined (in terms of perf and cost) new ORM code being deployed (SQLAlchemy). We do an insane number of read queries per second relative to our usage. I honestly think the newish devs we have hired don't understand SQL at all. They seem to think of it as some arcane low level thing people used in the 80s/90s.
- stoneman24 10mo agoI would really like to send this article out to all the developers in my small company (only 120+ people, about 40 dev & test) but the political path has been chosen and the new shiny tech has people entranced. What we do (physics simulation software) doesn’t need all the complexity (in my option as a long time software developer & tester) and software engineering knowledge that splitting stuff into micro services require. Only have as much complexity as you absolutely need, the old saying “Keep it simple, stupid” still has a lot of truth. But the path is set, so I’ll just do my best as an individual contributor for the company and the clients who I work with.
- LtWorf 10mo agoI thought microservices were old by now, which is why this kind of articles are finally appearing.
- Nextgrid 10mo agoIt's less about how old microservices are and more that ZIRP being over, there is now finally pressure to improve software development efficiency, and to a certain extent, optimize infrastructure costs. Developers are now riding the new wave.
- walt_grata 10mo agoI started making the case for organizational efficiency rather than a technical argument. Demonstrating where the larger number of people and teams necessary to make a decision and a change and how that impacts the amount of time to ship new features has been more effective IME.
- szundi 10mo ago[dead]
- echelon 10mo agoIf you have workloads with different shapes, microservices make sense. If not, do the monolith thing as long as you can. But if you're processing jobs that need hand off to a GPU, just carve out a service for it. Stop lamenting over microservices. If you've got 100+ engineers and different teams own different things, try microservices. Otherwise, maybe keep doing the monolith. If your microservice is as thin as leftpad.js and hosts only one RPC call, maybe don't do that. But if you need to carve out a thumbnailing service or authC/authZ service, that's a good boundary. There is no "one size fits all" prescription here.
- mjr00 10mo agoI feel like this has been beaten to death and this article isn't saying much new. As usual the answer is somewhere in the middle (what the article calls "miniservices"). Ultimately 1. Full-on microservices, i.e. one independent lambda per request type, is a good idea pretty much never. It's a meme that caught on because a few engineers at Netflix did it as a joke that nobody else was in on 2. Full-on monolith, i.e. every developer contributes to the same application code that gets deployed, does work, but you do eventually reach a breaking point as either the code ages and/or the team scales. The difficulty of upgrading core libraries like your ORM, monitoring/alerting, pandas/numpy, etc, or infrastructure like your Java or Python runtime, grows superlinearly with the amount of code, and everything being in one deployed artifact makes partial upgrades either extremely tricky or impossible depending on the language. On the operational and managerial side, deployments and ownership (i.e. "bug happened, who's responsible for fixing?") eventually get way too complex as your organization scales. These are solvable problems though, so it's the best approach if you have a less experienced team. 3. If you're implementing any sort of SoA without having done it before -- you will fuck it up. Maybe I'm just speaking as a cynical veteran now, but IMO lots of orgs have keen but relatively junior staff leading the charge for services and kubernetes and whatnot (for mostly selfish resume-driven development purposes, but that's a separate topic) and end up making critical mistakes. Usually some combination of: multiple services using a shared database; not thinking about API versioning; not properly separating the domains; using shared libraries that end up requiring synchronized upgrades. There's a lot of service-oriented footguns that are much harder to unwind than mistakes made in a monolithic app, but it's really hard to beat SoA done well with respect to maintainability and operations, in my opinion.
- SatvikBeri 10mo agoRe 1: I like Matt Ranney's take on it, where he says microservices are a form of technical debt – they let you deploy faster and more independently in exchange for an overall more complex codebase. This makes it clear when you might want microservices: you're going through a period of hypergrowth and deployment is a bigger bottleneck than code. This made sense for DoorDash during covid, but that's a very unusual circumstance
- yowlingcat 10mo ago
- rockemsockem 10mo agoYou need multiple services whenever the scaling requirements of two components of your system are significantly different. That's pretty much it. These are often called micro services, but they don't have to actually be "micro"
- twodave 10mo agoI came here to say the same. If you’re arguing either for or against microservices you’re probably not thinking about the problem correctly. Running one big service may make sense if your resource needs are pretty uniform. Even if they’re not you need to weight the cost of adding complexity vs the cost of scaling some things prematurely or unnecessarily. Often this is an acceptable precursor to splitting up a process.
- Nextgrid 10mo agoYou can still horizontally scale a monolith and distribute requests equally or route certain requests to certain instances; the only downside is that those instances would technically waste a few hundred MBs of RAM holding code for endpoints they will never serve; however RAM is cheap compared to the labor cost of a microservices environment.
- rockemsockem 10mo agoFor those numbers, yeah you should absolutely do that. But you might want to host your database on different machines than your application because the numbers will likely differ by much more than a few hundred MBs.
- roncesvalles 10mo agoThat's the most nonsensical reason to adopt microservices imo. Consider this: every API call (or function call) in your application has different scaling requirements. Every LOC in your application has different scaling requirements. What difference does it make whether you scale it all "together" as a monolith or separately? One step further, I'd argue it's better to scale everything together because the total breathing room available to any one function experiencing unusual load is higher than if you deployed everything separately. Not to mention intra- and inter-process comm being much cheaper than network calls. The "correct" reasons for going microservices are exclusively human -- walling off too much complexity for one person or one team to grapple with. Some hypothetical big brain alien species would draw the line between microservices at completely different levels of complexity.
- deleted 10mo ago[deleted]
- INTPenis 10mo agoI'm helping a company get out of legacy hell right now. And instead of saying we need microservices, let's start with just a service oriented architecture. That would be a huge step forward. Most companies should be perfectly fine with a service oriented architecture. When you need microservices, you have made it. That's a sign of a very high level of activity from your users, it's a sign that your product has been successful. Don't celebrate before you have cause to do so. Keep it simple, stupid.
- dragonwriter 10mo ago> And instead of saying we need microservices, let's start with just a service oriented architecture. I think the main reason microservices were called “microservices” and not “service-oriented architecture” is that they were an attempt to revive the original SOA concept when “service-oriented architecture” as a name was still tainted by association to a perceived association with XML and the WS-* series of standard (and, ironically, often systems that supported some subset of those standards for interaction despite not really applying the concepts of the architectural style.)
- shoo 10mo agoService oriented architecture seems like a pretty good idea. I've seen a few regrettable things at one job where they'd ended up shipping a microservice-y design but without much thought about service interfaces. One small example: team A owns a service that runs as an overnight job making customer specific recommendations that get written to a database, and then team B owns a service that surfaces these recommendations as a customer-facing app feature and directly reads from that database. It probably ended up that way as team A had the data scientists and team B had the app backend engineers for that feature and they had to ship something and no architect or senior engineer put their foot down about interfaces. That'd be pretty reasonable design if team A and team B were the same team, so they could regard the database as internal with no way to access it without going through a service with a well defined interface. Failing that, it's hard to evolve the schema of the data model in the DB without a well defined interface you can use to decouple implementation changes from consumers and where the consuming team B have their own list of quarterly priorities. Microservices & alternatives aren't really properties of the technical system in isolation, they also depend on the org chart & which teams owns what parts of the overall system. SOA: pretty good, microservices: probably not a great idea, microservices without SOA: avoid. For anyone unfamiliar with SOA, there's a great sub-rant in Steve Yegge's 2011 google platforms rant [1][2] focusing on Amazon's switch to service oriented architecture. [1] https://courses.cs.washington.edu/courses/cse452/23wi/papers/yegge-platform-rant.html https://courses.cs.washington.edu/courses/cse452/23wi/papers... [2] corresponding HN thread from 2011 https://news.ycombinator.com/item?id=3101876 https://news.ycombinator.com/item?id=3101876
- 8f2ab37a-ed6c 10mo agoIt's funny that we've now been having this conversation on HN for at least a decade.
- deleted 10mo ago[deleted]
- awesome_dude 10mo agoWe watched kernels go from monoliths to micro to hybrid. And, now, SAAS is finally making the jump to the last position - hybrid/mini
- scuff3d 10mo agoThe other problem is that very very few people actually know how to design a microservice based architecture. I've worked with half a dozen different teams who claim they're building microservices, but when you look at the system it's just a giant distributed monolith. Most of them are people who worked in legacy code bases, and while they like the idea of microservices, they can't let go of those design patterns. So they do the exact same thing but just out everything behind network calls. Drives me absolutely fucking nuts
- tdhz77 10mo agoI found a different benefit to micro services — AI understands them and context matters. Monolithic app confuse ai where micro services enables them to be far more effective.
- makapuf 10mo agoThat's a benefit for monoliths, then.
- zmmmmm 10mo agoIt's an interesting question how AI influences this. If it scales up the scope of what an individual engineer can do, and if the primary driver of microservice scope is Conway's law, then in theory microservices should get "fatter". However I go the other way than you: I have found AI needs as much context as possible and that means it understands monoliths (or fatter architectures) better. At least, the agentic style approach where it has access to the whole git tree / source repository. I find things break down a lot when changes are needed across source repositories.
- ForOldHack 10mo agoDuring a major site rewrite, one of my junior cohorts, suggested a monolithic re-entrant site... Easily tripled the TPS, and halved the response time. I was stunned... He comes up with this stuff all the time. Thanks Matt.
- bunjammin 10mo ago[dead]
- AJRF 10mo agoAnother good use case for a microservice - if you are going to have to change the compute size for your monolith just to accommodate the new functionality. I had an architect bemoan the suggestion we use a microservice, until he had to begrudgingly back down when he was told that the function we were talking about (Running a CLIP model) would mean attaching a GPU to every task instance.
- moltar 10mo agoI don’t want or need microservices. I want just services.
- karmakaze 10mo agoThere's one thing I've learned about microservices. If you've ever gone down the path of making them, failing and making them again until they all worked as they should with the desired 9's of uptime, then you'll only want to make them if it's really the right thing to make. It's not worth the effort otherwise. So no I don't want microservices (again), but sometimes it's still the right thing.
- deleted 10mo ago[deleted]
- venturecruelty 10mo agoI don't want or need microservices. What I want is for people to stop putting TCP roundtrips in between what would otherwise be simple function calls in a sane universe. I don't want to have to take a graduate-level course on the CAP theorem to clock in and work on whatever "Uber for dogs" nonsense is paying my rent. You almost certainly don't have a scaling problem that necessitates a distributed system, I guarantee it. I have had an average career, and every single time someone shoved a Kubernetes-shaped peg into a server-shaped hole, it's been a shitshow. These systems are slow, expensive, difficult to reason about, and largely unnecessary for most people who handle a few hundred or thoudsand connections per second (on average. Don't @ me about bursty traffic, I understand how it works). And in a few days, we're going to get a long thread about how software is slow and broken and terrible, and nobody will connect the dots. Software sucks because the way we build it sucks. I've had the distinct privilege of helping another team support their Kubernetes monstrosity, which shat the bed around double-digit requests per second, and it was a comedy of errors. What should've otherwise just been some Rails or Django application with HTML templating and a database was three or four different Kubernetes pods, using gRPC to poorly and unnecessarily communicate with each other. It went down all. The. Time. And it was a direct result of the unnecessary complexity of Kubernetes and the associated pageantry. I would also like to remind everyone that Kubernetes isn't doing anything your operating system can't do, only better. Networking? Your OS does that. Scheduling? Your OS does that. Resource allocation and sandboxing? If your OS is decent, it can absolutely do that. Access control? Yup. I can confidently say that 95% of the time, you don't need Kubernetes. For the other 5%, really look deep into your heart and ask yourself if you actually have the engineering problems that distributed systems solve (and if you're okay with the other problems distributed systems cause). I've had five or six jobs now that shoehorned Kubernetes into things, and I can confidently say that the juice ain't worth the squeeze.
- Nextgrid 10mo ago> I don't want to have to take a graduate-level course on the CAP theorem It would be a blessing if people actually did that, because then they'd avoid useless distributed systems. > using gRPC to poorly and unnecessarily communicate At least you've had the blessing of it being gRPC and not having to manually write JSON de/serializers by hand. > Kubernetes isn't doing anything your operating system can't do Kubernetes is good if you need to orchestrate across multiple machines. This of course requires an actual need for multiple machines. If you're doing so with underpowered cloud VMs (of which you waste a third of the RAM on K8s itself), just get a single bigger VM and skip K8s.
- hosh 10mo agoIt is not so black and white. The BEAM ecosystem (Erlang, Elixir, Gleam, etc) can do distributed microservices within a monolith. A single monolith can be deployed in different ways to handle different scalability requirements. For example, a distinct set of pods responding to endpoints for reports, another set for just websocket connections, and the remaining ones for the rest of the endpoints. Those can be independently scaled but released on the same cadence. There was a long form article I once read that reasoned through this. Given M number of code sources, there are N number of deployables. It is the delivery system’s job to transform M -> N. M is based on how the engineering team(s) work on code, whether that is a monorepo, multiple repos, shared libraries, etc. N is what makes sense operationally . By making it the delivery system’s job to transform M -> N, then you can decouple M and N. I don’t remember the title of that article anymore. (Maybe someone on the internet remembers).
- Nextgrid 10mo ago> The BEAM ecosystem (Erlang, Elixir, Gleam, etc) can do distributed microservices within a monolith. This ain't new. Any language supporting loading modules can give you the organization benefit of microservices (if you consider it a benefit that is - very few orgs actually benefit from the separation) while operating like a monolith. Java could do it 20+ years ago, just upload your .WAR files to an application server.
- rdtsc 10mo ago> Java could do it 20+ years ago, just upload your .WAR files to an application server. Erlang could do it almost 40 years ago. It can be used to upgrade applications at runtime without stopping the service. That works well in Erlang, it’s designed from the ground up for it. I know of a few places that used that feature.
- venturecruelty 10mo agoErlang seems like a joy to use. I feel a slight pang of regret that I haven't (yet) gotten to use it in my career. (I don't quite have the time or energy to play with it during my off hours, but it is on my list for someday.)
- gnarlouse 10mo agoI think most of the time when small teams say “we should do microservices” what they really mean is “we should try a service oriented architecture.” Especially if you’re doing a monorepo, it becomes fairly routine to make choices around how to consolidate like modules. For example, I work in a small company with a data processing pipeline that has lots of human in the loop steps. A monolith would work, but a major consideration with it being a small company is cloud cost, and a monolith would mean slow load times in serverless or persistent node costs regardless of traffic. A lot of our processing steps are automated and ephemeral, and across all our customers, the data tends to look like a wavelet passing through the system with an average center of mass mostly orbiting around a given step. A service oriented architecture let us: - Separate steps into smaller “apps” that run on demand with serverless workers. - avoid the scaling issues of killing our database with too many concurrent connections by having a single “data service”—essentially organizing all the wires neatly. - ensure that data access (read/write on information extracted from our core business objects) happens in a unified manner, so that we don’t end up with weird, fucky API versioning. - for the human in the loop steps, data stops in the job queue at a CRUD app as a notification, where data analysts manually intervene. A monolith would have been an impedance mismatch for the inherent “assembly line” model here, regardless of dogma and the fact that yes, a monolith could conceivably handle a system like this without as much network traffic. You could argue that the data service is a microservice. It’s a single service that serves a single use case and guards its database access behind an API. I would reply to any consternation or foreboding due to its presence in a small company by saying “guess what, it works incredibly well for us. Architecture is architecture: the pros and cons will out, just read them and build what works accordingly.”
- effnorwood 10mo agoNo
- PebblesHD 10mo agoWhile not a complete rebuttal, allow me the following. I manage a team of 4 scrum masters each with 5-6 engineers. We provide services via a user interface we'll call the console, as would be fairly familiar to any B2B or B2C service provider. The backends of this portal are split up by functional area, so we have a compute management service providing CRUD apis for dealing with our compute offerings, a storage service for CRUD on our storage offerings, a network service for interacting with networks etc. all sharing a single, albeit sharded, underlying data store. My teams pick up a piece of work, check out the code, run the equivalent of docker compose up, and build their feature. They commit to git, merge to dev, then to main, and it runs through a pipeline to deploy. We do this multiple times a day. Doing that with a large monolith that combines all these endpoints into one app wouldn't be hard, but it adds no benefits, and the overhead that now we have 4 teams frequently working on the same code and needing to rebase and pull in change, rather than driving simple atomic changes. Each service gets packaged as a container and deployed to ECS fargate, on a couple of EC2 instances that are realistically a bit oversubscribed if all the containers suddenly got hammered, but 90% of the time they don't, so its incredibly cost effective. When I see the frequent discussions around microservices, I always want to comment that if you have a disfunctional org, no architecture will save you, and if you have a functional org, basically any architecture is fine, but for my cases, I find that miniservices if you will, domain driven and sharing a persistence layer, is often a good way to go for a couple of small teams.
- odie5533 10mo ago> we have 4 teams frequently working on the same code and needing to rebase and pull in change, rather than driving simple atomic changes. You have to pull in changes either way. Either there are contract changes between teams or there aren't. If there aren't, you don't need to rebase just do squash and merge. If there are, then you're going to either find out about the changes now or you're going to find out about them in production when your container starts throwing errors.
- atoav 10mo agoThe problem I see with microservices is that many realworld problems won't have the clear domain boundaries one would wish for. And the more your problem is one, where every part of the program needs any piece of information occasionally the less it makes sense to split them up into many services. That does not mean it never makes sense to split up things. It just means there may be differing definitions of what "micro" means and there are problems where the service domains are neatly seperable and others where they are not (or you won't win anything if you separate them). Turning a thing into a service is just like turning a thing into a module or it's own function. It can be a good idea or a bad idea depending on circumstances.
- Revisional_Sin 10mo agoI was once working on a project where we had a gRPC server that inserted data into the DB for another service. This split was probably a mistake, as the interface we exposed resulted in us making twice as many DB calls as we actually needed to. One of the stored procs needed a magic number as a parameter, which we looked up via another DB query. One of the other Devs on the team tried to convince me to write a separate gRPC server to run this (trivial) query. "We're doing microservices, so we need to make everything as small as possible. Looking up this value is a separate responsibility from inserting data." Luckily our tech lead was sane and agreed with me.
- drob518 10mo agoI’m always shocked when engineers smitten with the microservices bug try to insist that converting a simple, reliable, in-process function call to a network hop plus serialization plus retry and back off and circuit breaker logic is going to be faster. I’m sure that there are situations where microservices are appropriate, but I’ve never seen one. Mostly I see engineers playing in a sandbox of complexity and then shipping buggy code late. It reminds me of Billy Bean’s question in the movie Money Ball: "If he's a good hitter, why doesn't he hit good?"
- ReclusiveCoder 10mo agoWell said! Every service boundary replaces a function call with a network request. That one choice cascades into distributed transactions, eventual consistency, and operational overhead most teams don't need. ¯\_(ツ)_/¯
- HackerThemAll 10mo agoOh no, that is blasphemy! What else they'll gonna belittle? OO design patterns? /s
- masfoobar 10mo agoI am a big fan of 'do one thing and one thing well' -- that UNIX philosophy. Whether it's a program that does something well... or simply a function/procedure --- it all depends on the problem I/we are trying to solve. I never liked using the word "Microservices" but my aim has always to build SIMPLE solutions. I learn new words in this world. For the most part I am building "Miniservices" but there are a few that are considered "Microservices" but again are not complicated! I just like to refer it as "Distributed Computing" because the solution can be anywhere between Monolithic or Microservices. Truth is you are building a combination of them that communicate in one form or another. I will always remember a Till system (past job) that was sending data to the server poorly and slowly with a Monolithic solution and a Database. Was it becoming a pain to handle with new shops being added in Europe? Yes. However, this is NOT the fault of Monolithic. It's just the solution that was used for "good" originally but is struggling now. The solution I replaced it with allowed data being sent to the server using ZeroMQ. It worked out well.. was fast and reliable. Each section was broken down on the server. Again - is it is perfect solution or does it prove that "Monolithic is worse that Micrsoservices" (or Distributed Computing) -- NO! Truth is our software is a mix of them all!
- pyuser583 10mo agoI personally think ZeroMQ is severely underutilized. Fixes so many problems. But it can be hard to encourage adoption. It’s not HTTP, or a conventional queue system. Requires lots of explanations, thinking, and eventually meetings.
- masfoobar 10mo agoI made a lot of uses for the Push-Pull pattern in ZeroMQ.. but there was others used as well here and there (Pub-Sub, etc) However -- I cannot praise the use of ROUTER-DEALER !! What a GREAT pattern for sending large chunks of data without waiting for a reply for each. HTTP is not fit for such a task. However - I totally get you! Trying to explain certain decisions really does take up time and effort. Before you know it, I have lost 4 hours one day, a few another, etc. In the end you ask if I should have done something mediocre... but everyone understands. ("mediocre" is not the correct word to use. I mean I could have gone with Kafka or RabbitMQ. It's just an extra layer which would have involved infrastructure and further delays (at that time))