.Net has some caveats with GC: Server GC preallocates heap per CPU core so if you have 8+ server it could be a waste of RAM if app uses less than 1GiB. We are tinkering with microservices on .Net Core 2 in k8s and came up with using WS mode with clearing unused allocated memory on health check calls which is dirty but working trick.
On the Java side though there is a hack in JRE which checks if JVM runs inside a Docker container in order to not get out of memory limit by cgroup.
On the Java side though there is a hack in JRE which checks if JVM runs inside a Docker container in order to not get out of memory limit by cgroup.