|
|
|
|
|
by emforce
3170 days ago
|
|
I believe I addressed this in the 4th paragraph of this article. I can't imagine many teams going back and optimizing their memory usage after they've deployed something to production. Unless you have capacity in your sprint to do some fine grained optimization of these things you'll most likely be looking at extending the platform or picking up potential feature requests. But even still, the point still stands whilst not to the same extreme. You have to actually to set this flag in order to reduce 64MB which is still 60+ times the size of a similar Go service and 3-4 times the size of a thin Java/Python application. |
|
Yes of course, for a single service with one endpoint that does nothing it is bloat. But which microservice does nothing?
Think about a database backend, actuator endpoints, etc. They are all possible with a memory footprint of ~200mb. It can be less is you use another language, but I doubt that Go will give you such a major framework for developing a microservice. And this will save you a lot more time than taking an hour to reduce your memory footprint.
And one thing you missed too: Using the JVM should also be combined with a basic knowledge about how the heap works. And if you do not limit it, it will get a lot bigger than required, this should be common knowledge. Comparing this to Go it seems like a much better way. In Go there is afaik no way to limit the heap. In worst case it will grow and grow and grow.