This week we helped a customer who was facing an issue with timezones.
Sit tight.
It's fun.
1/n
Customer reported that when they started using MS Build of OpenJDK, date/time data was being inserted with the wrong time. A close look showed that the timezone was GMT-0.
Weird. But not difficult to solve. Add the following to the Dockerfile:
ENV TZ "America/Sao_Paulo"
2/n
Now the date/time was *almost* correct: there was still a shift of one hour. Fuck you, Daylight Saving Time policies.
ActiveProcessorCount currently matches cpu_quota: up to 1000m, 1 proc. 1001-2000m, 2 procs, and so on.
This sounds reasonable, but as we've learned, CFS control does not limit CPU count, only CPU time. Multiple native threads may execute in parallel, until the quota is reached.
JVM Ergonomics also selects G1GC by default only when the JVM sees more than 1792 MB of available memory, and 2 available processors (2000m+ in k8s). Otherwise it picks SerialGC.
Thus why so many devs force -XX:+UseG1GC in well constrained containers.
Not only #Java developers are deploying their microservices to #Kubernetes with 1 vCPU only (1000m), there may be multiple pods on the same nodes since podAntiAffinity is unlikely to be common practice when scaling, to get an even distribution.
So, instead of having a bigger pod (2000m-4000m) on a node, there are two or more 1000m pods on a node.
For web apps, I think this setup is very unlikely to be reasonable.
I hope I am wrong and that my lame knowledge of Kubernetes followed by my hate towards YAML is as bad as this hypothesis.
This site was supposed to be the answer, but it only raises even more questions. The information here is mostly marketing-related, and has pointers to other online locations, outside go.java.
The Java source, no doubt. Yet, devs who want to just learn/code Java apps will only find binaries downloads. Nothing else serves the average Java software developer. "Developer's Guide" is for contributors.