Posts

Showing posts from July, 2022

Questions

 Java 8 : 1. What is functional Interface? 2. What is predicate? what is return value? Core Java : 1. Spring Boot : 1. How to handle 2 @Bean with same name? 2. Annotations in spring boot?  Micro Services : 1. What is design pattern? 2. What is Gateway API? 3. What is circuit breaker?

Cloud Deployment Command

 Open Port on Cloud : sudo iptables -I INPUT 5 -p tcp -m tcp --dport 8080 -j ACCEPT Create Package for backend service : mvn package -DskipTests Build Docker Image : docker build --no-cache -t backend-service:1.0 . Run docker Container : docker run -d -it --net=host backend-service:1.0 Pass Environment Variables to a run Docker Container : docker run -d -it --net=host --env spring.profiles.active=prod backend-service:1.0 Docker Commands :  sudo docker ps -a sudo docker rm container_id sudo docker images sudo docker logs container_id

Microservices

Image
  Principles Used to Design Microservice Architecture The principles used to design Microservices are as follows: Independent & Autonomous Services Scalability Decentralization Resilient Services Real-Time Load Balancing Availability Continuous delivery through DevOps Integration Seamless API Integration and Continuous Monitoring Isolation from Failures Auto -Provisioning Design Patterns of Microservices Aggregator API Gateway Chained or Chain of Responsibility Asynchronous Messaging Database or Shared Data Event Sourcing Branch Command Query Responsibility Segregator Circuit Breaker Decomposition API Gateway Design Pattern Microservices are built in such a way that each service has its own functionality. But, when an application is broken down into small autonomous services, then there could be few problems that a developer might face. The problems could be as follows: How can I request information from multiple microservices? Different UI require different data to respond to ...