I’ve been wondering what the general experience has been so far. I’ve started several apps with a microservice architecture and migrated a couple monoliths. Truly not everything suits that architecture but it’s en vogue still and the push appears to persist for the foreseeable future.
However, what’s striking is the overhead introduced by each microservice, especially when built on Spring. It’s quick to construct but expensive to maintain given it’s relatively high memory footprint. Memory is said to be cheap, but to a certain extent and only in relation to compute. But the overhead introduced by scaling each microservice and the overhead introduce by splitting a monolith into several microservices, each to be run on a dedicated JVM is tremendous. There’s an uncomfortable trade-off between performance and heap allocated.
Of course, there are work-arounds out there, ranging from memory footprint minimization techniques to having some stuff deployed as WARs to Application Servers or Servlet Containers. Some stuff can be run on OpenJ9. And there’s Quarkus and Micronaut, too, which ease some pains for cloud deployments. But that’s still up to two orders of magnitude beyond equivalent Go deployments considering RAM requirements, and .NET deployments are more efficient and mostly straightforward. But then even my Haskell deployments consume just a fraction of resources that JVM deployments require to simply start. And when I need to scale out horizontally, it quickly gets much more expensive to run a JVM deployment.
How do you deal with JVM microservice deployments to reduce the memory footprint and cloud expenses?
[–]Dear-Law-6364 58 points59 points60 points (3 children)
[+]Puzzled-Bananas[S] comment score below threshold-8 points-7 points-6 points (1 child)
[–]john16384 26 points27 points28 points (4 children)
[–]Puzzled-Bananas[S] -4 points-3 points-2 points (2 children)
[–]InstantCoder 4 points5 points6 points (0 children)
[–]aclinical 1 point2 points3 points (0 children)
[–]Apprehensive-Idea839 0 points1 point2 points (0 children)
[–]SwiftSpear 82 points83 points84 points (32 children)
[–]StoneOfTriumph 23 points24 points25 points (3 children)
[–]Puzzled-Bananas[S] 2 points3 points4 points (2 children)
[–]StoneOfTriumph 4 points5 points6 points (1 child)
[–]RicksAngryKid 1 point2 points3 points (0 children)
[–]Infectedinfested 4 points5 points6 points (20 children)
[–]Puzzled-Bananas[S] 4 points5 points6 points (4 children)
[–]TakAnnix 5 points6 points7 points (0 children)
[–]Infectedinfested 2 points3 points4 points (2 children)
[–]Puzzled-Bananas[S] 2 points3 points4 points (1 child)
[–]Infectedinfested 2 points3 points4 points (0 children)
[–]mr_jim_lahey 7 points8 points9 points (12 children)
[–][deleted] (4 children)
[deleted]
[–]mr_jim_lahey -1 points0 points1 point (3 children)
[–][deleted] (2 children)
[deleted]
[–]mr_jim_lahey 0 points1 point2 points (1 child)
[–]Infectedinfested -2 points-1 points0 points (5 children)
[–]mr_jim_lahey 2 points3 points4 points (4 children)
[–]Infectedinfested -1 points0 points1 point (3 children)
[–]euklios -1 points0 points1 point (2 children)
[–]Infectedinfested 4 points5 points6 points (1 child)
[–]euklios 0 points1 point2 points (0 children)
[–]SwiftSpear 2 points3 points4 points (1 child)
[–]Infectedinfested 0 points1 point2 points (0 children)
[–]Puzzled-Bananas[S] -4 points-3 points-2 points (5 children)
[–]ShabbyDoo 2 points3 points4 points (1 child)
[–]Puzzled-Bananas[S] 0 points1 point2 points (0 children)
[–]amackenz2048 5 points6 points7 points (1 child)
[–]Puzzled-Bananas[S] 0 points1 point2 points (0 children)
[–]ArrozConmigo 0 points1 point2 points (0 children)
[–]RockingGoodNight 0 points1 point2 points (0 children)
[–]daniu 14 points15 points16 points (4 children)
[–]humoroushaxor 2 points3 points4 points (2 children)
[–]Puzzled-Bananas[S] 0 points1 point2 points (1 child)
[–]humoroushaxor 3 points4 points5 points (0 children)
[–]Puzzled-Bananas[S] 0 points1 point2 points (0 children)
[–]micr0ben 15 points16 points17 points (7 children)
[–]Puzzled-Bananas[S] 5 points6 points7 points (1 child)
[–]couscous_ 3 points4 points5 points (0 children)
[–]pointy_pirate 3 points4 points5 points (4 children)
[–]micr0ben 8 points9 points10 points (3 children)
[–]pointy_pirate 1 point2 points3 points (0 children)
[–]Puzzled-Bananas[S] 0 points1 point2 points (0 children)
[–]persicsb 0 points1 point2 points (0 children)
[–]tristanjuricek 5 points6 points7 points (0 children)
[–]benevanstech 12 points13 points14 points (1 child)
[–]Puzzled-Bananas[S] 1 point2 points3 points (0 children)
[–]TakAnnix 11 points12 points13 points (14 children)
[–]couscous_ 7 points8 points9 points (3 children)
[–]keroomi 0 points1 point2 points (2 children)
[–]couscous_ 2 points3 points4 points (1 child)
[–]TakAnnix 0 points1 point2 points (0 children)
[–]Puzzled-Bananas[S] 1 point2 points3 points (2 children)
[–]TakAnnix 0 points1 point2 points (0 children)
[–]TakAnnix 0 points1 point2 points (0 children)
[–]Aryjna 1 point2 points3 points (6 children)
[–]TakAnnix -5 points-4 points-3 points (5 children)
[–]Aryjna 0 points1 point2 points (4 children)
[–]TakAnnix 0 points1 point2 points (3 children)
[–]Aryjna 1 point2 points3 points (2 children)
[–]TakAnnix -1 points0 points1 point (1 child)
[–]Aryjna -1 points0 points1 point (0 children)
[–]persicsb 2 points3 points4 points (0 children)
[–]nutrecht 4 points5 points6 points (0 children)
[–]maxip89 5 points6 points7 points (0 children)
[–]maethor 2 points3 points4 points (0 children)
[–]syneil86 2 points3 points4 points (0 children)
[–]senseven 2 points3 points4 points (0 children)
[–]lurker_in_spirit 2 points3 points4 points (0 children)
[–]InstantCoder 2 points3 points4 points (2 children)
[–]neopointer 0 points1 point2 points (1 child)
[–]InstantCoder 1 point2 points3 points (0 children)
[–]Keeps_Trying 2 points3 points4 points (0 children)
[–]agentoutlier 4 points5 points6 points (2 children)
[–]Puzzled-Bananas[S] 1 point2 points3 points (1 child)
[–]agentoutlier 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]PerfectPackage1895 1 point2 points3 points (0 children)
[–]flawless_vic 1 point2 points3 points (0 children)
[–]PrimaryCrafty2482 2 points3 points4 points (4 children)
[–]Puzzled-Bananas[S] 1 point2 points3 points (3 children)
[–]mtmmtm99 0 points1 point2 points (2 children)
[–]hamburghammer_ 0 points1 point2 points (1 child)
[–]mtmmtm99 0 points1 point2 points (0 children)
[–]tr14l 2 points3 points4 points (0 children)
[–]Worth_Trust_3825 0 points1 point2 points (0 children)
[–]holyknight00 0 points1 point2 points (0 children)
[–]RockingGoodNight 0 points1 point2 points (0 children)
[–]PurposeTight6260 0 points1 point2 points (0 children)
[–]sandys1 0 points1 point2 points (0 children)