Sunday, April 18, 2021
Netflix OSS - Service Discovery (Eureka) Circuit Breaker (Hystrix) Intelligent Routing (Zuul) Client Side Load Balancing (Ribbon)
http://salerno-rafael.blogspot.com/2016/08/spring-cloud-netflix-how-works-service.html
Spring Cloud Netflix - How works Service Registration and Discovery
- Service Discovery (Eureka)
- Circuit Breaker (Hystrix)
- Intelligent Routing (Zuul)
- Client Side Load Balancing (Ribbon)
Will be available on http://localhost:8761 and will be showed some information’s and a screen with the instances available.
Now in the server is possible see the instance registered:
Now in the server is possible see the new instance registered:
all instances already registered:
- Eureka’s information like IP address, App Name, Status, port ...
- Service’s Environment
- Instance’s Environment
- Service health
- Instances health
Micro-FrontEnd
- Iframes
- Through NGINX
- Web Components/Angular Elements
- Angular Libraries
- Monorepos
- Customized Orchestrator
java.lang.OutOfMemoryError: Metaspace
So if you were familiar with PermGen then all you need to know as background is that – whatever was in PermGen before Java 8 (name and fields of the class, methods of a class with the bytecode of the methods, constant pool, JIT optimizations etc) – is now located in Metaspace.
As you can see, Metaspace size requirements depend both upon the number of classes loaded as well as the size of such class declarations. So it is easy to see the main cause for the java.lang.OutOfMemoryError: Metaspace is: either too many classes or too big classes being loaded to the Metaspace.
Classloader Leak
A classloader leak happens when an application is redeployed, but there are lingering instances of the previous deployment’s classes left. These lingering instances prevent their Classes from being garbage collected, which, in turn, prevent the classloaders and all the classes held therein from being collected, too. Here’s an example of that situation:
Apparently, the application starts a thread that cleans up connections. As noble of a goal as it is, the application does not stop the thread on un-deploy, so it keeps hold of the classloader. Cleanup threads and Timer threads are by far the most common reason for the leaks. A simple way of fixing this issue would be to add a shutdown hook by implementing a ServletContextListener:
public class CleanupCleanup implements ServletContextListener { @Override public void contextDestroyed(ServletContextEvent sce) { // Stop the cleanup thread } //... }
Java + HTTPS: Unable to Find Valid Certification Path to Requested Target
https://www.baeldung.com/java-import-cer-certificate-into-keystore
From this documentation keytool - Key and Certificate Management Tool, the Changes section at the end of the page says :
Renamed commands:
-import, renamed to -importcert
The keytool has many options but the one we're interested in is importcert which is as straightforward as its name. Since there are usually different entries inside a KeyStore, we'll have to use the alias argument to assign it a unique name:
> keytool -importcert -alias baeldung_public_cert -file baeldung.cer -keystore sample_keystore
> Enter keystore password:
...
> Trust this certificate? [no]: y
> Certificate was added to keystore
Azure - Pipeline - Add Approver for Stage
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
https://www.baeldung.com/spring-properties-file-outside-jar https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-featu...
-
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass
-
The decision was made to block such external HTTP repositories by default https://stackoverflow.com/questions/66980047/maven-build-failure-d...