git delete commit

  • Local unpushed commit
    • git reset –hard <which commit to reset to>
  • pushed commit
    • git revert <which commit to delete>

Spring Cloud Netflix

Spring Cloud Netflix provides Netflix OSS integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms. With a few simple annotations you can quickly enable and configure the common patterns inside your application and build large distributed systems with battle-tested Netflix components. The patterns provided include Service Discovery (Eureka), Circuit Breaker (Hystrix), Intelligent Routing (Zuul) and Client Side Load Balancing (Ribbon)..

  • Hysterix: Ckt Breaker: Fault Tolerance and Resilience ….Also Netflix OSS
    • currently not in active development as it’s ckt breaker parameters namely when to break and how long to wait before retry are statically configured
    • Future is “Adaptive Fault Tolerant” systems like Resilience4j 
  • Ribbon: Client side load balancer….when client calls eureka discovery server, it returns the url for all instances of the eureka client (microservice) running currently and registered with eureka server…the UI client can then use Ribbon library (JS) to do round robin and call all instances in case any instance is down…this is client side load balancing


  • Service Discovery  is client side and server side…Spring Cloud (SC) uses former using Netflix OSS implementation called Eureka
  • Spring Cloud Config Server (SCCS): A microservice to externalize all config which all instances of business microservice call to get same config every time. It can talk to external systems like git or DB where the config is stored so that config can be versioned and updated without requiring any build.
    • To have the mictoservice pick up config updated dynamically without restart, use spring boot actuator to configure a endpoint that you can call after updating config, which would indicate to microservice to update it’s config from config server and then refresh beans annotated with @refreshScope
    • Spring Security: Used to encrypt config, specifically credentials, api keys, connection strings. SCCS encrypts the config and decrypts it before seding it to the microservice. It uses Java Cryptography Extension to encrypt.
    • Alternate is Apache Zookeeper
    • Zuul: Intelligent Routing…Acts as load balancer and reverse proxy…talks to eureka server to find all eureka clients and how many instances of each client are currently running (so that it can load balance UI calls). All UI requests go through Zuul hence it acts like api gateway.
      • It’s implemented as a spring boot microservice and has dependency on eureka client as zuul too registers with eureka server
  • Spring Initializr to create spring boot apps:
  • Sleuth/Zipkin: Call Tracing like in App Dynamics