Microservices Interview Questions

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What does Spring Cloud solve?

1. Complexity associated with Distributed Systems. 2. Service Discovery. 3. Redundancy. 4Load Balancing. 5. Performance.

Features of a Microservice:

1. Decoupling 2. Componentization 3. Business Capabilities 4. Autonomy 5. Continuous Delivery 6. Responsibility 7. Decentralized Governance 8. Agility

What is the difference between Rest and Micro-services?

1.REST is a way to implement Microservices. 2.Microservices is an architecture style to build large scale application that can be scaled up indepndently. 3.REST is used in web apps as well as in API design. 4.In Microservices we follow certain design patterns to make it loosely coupled. 5.REST is a medium to build microservice.

SOAP messagure Structure

A SOAP message is an ordinary XML document containing the following elements. Envelope - defines the start and the end of the message. It is mandatory element. Header - Contains any optional attribute of the message used in the processing the message, either at an intermediary point or at the ultimate end point. (OPTIONAL) Body - Contains the XML data comprising the message being sent. It is a mandatory element. Fault - An optional Fault element that provide information about errors that occur while processing the message.

12 Factor App

A methodology for creating SaaS (Software as a Service) applications. Can be applied to any programming languages and combination of backing services.

What is the role of WEB, RESTful APIs in Microservices?

A microservice architecture function is based on concept that the infrastructure component must be able to interact. Microservices composition builds a business functionality and in order to archieve that they should be able to work with any of the other services and websites are required in order to achieve it. Each microservice must have an interface, that's why the web API is a vital enable of microservices. Being based on the open networking principles of the Web, RESTful APIs provide the most logical model for building interfaces between the various components of a microservice architecture.

Independent Development

All microservices can be easily developed based on their individual functionality.

Continuous Delivery

Allows frequent release of software, through systematic automation of software creation, testing, and approval.

REST (REpresentational State Transfer)

An architectural style for distributed hypermedia systems. Has 6 styles that must be satisfied for an interface to be considered Restful.

What is a Distributed Transaction?

Any Situation where a single event results in the mutation of two or more separate sources of data which cannot be committed atomically.

Independent Deployment

Based on their services, they can be individually deployed in any application.

REST vs SOAP

Both REST and SOAP allow users to create APIs. SOAP is the official protocol, and only accepts XML. It's also slower since it requires more bandwidth and resources. REST was made in response to SOAP's issues, and so it's faster and more flexible. It accepts HTML, JSON XML and plain text. Since it's more lightweight, it's growing increasingly more popular now that seconds matter more.

Circuit Breakers

Circuit breakers help an app function when failure arises. Remote calls within an app for a resource can fail. To prevent this, the circuit breaker design pattern wraps this function with a circuit breaker object with will watch for potential failures.

Eureka

Client side discovery pttern

Constraints of the RESTful API

Client-server Stateless Cache Uniform interface Layered System Code on Demand (Optional) CSCULC C - Client Server independent S - Stateless C- Cacheable U - Uniform Interface L- Layered System C- Code on Demand

What is coupling?

Coupling is a measure of the strength of the dependencies between components. ex. Good Design has High Cohesion and Low Coupling.

Mixed Technology Stack

Different Languages and technologies can be used to build different services of the same application.

Fault Isolation

Even if one service of the application does not work, the system still continues to functions.

Benefits of Kafka

Fast: A single Kafka broker can serve thousands of clients by handling megabytes of reads and writes per seconds Scalable: Data are partitioned and streamlined over a cluster of machines to enable larger data. Durable: Messages are persistent and is replicated within the cluster to prevent data loss. Distributed by Design: It provides fault tolerance guarantee and durabilty.

Types of Microservices

Hystrix (Monitoring) Kafka ( Messaging) Docker (Orchestration) Zuul(Gateway) Eureka(Discovery

Hystrix - what is it used for?

Hystrix is used for monitoring your microservice. Hystrix complete Java library that provides a great implementation of circuit breaker. This implementation provides a way of encapsulating your remtoe calls or whatever job inside a command, perform fallbacks, short circuit commands, metrics and more.

Continuous monitoring

Implies depth of monitoring coverage, from in browser front end performance metrics, through application performance, and down to host virtualized infrastructure metrics.

Advantages of Micro-services Architecture

Independent Development Independent Deployment Fault Isolation Mixed Technology Stack Granular Scaling

Granular Scaling

Individualcomponents can scale as per need there is no need to scale all components together.

Kafka

Is an open source stream processing software platform aims to provide a unified high throughout low latency platform for handling real time data feeds.

Responsibility

Microservices do not focus on applications as projects. Instead, they treat applications as product for which they are responsible.

Componentization

Microservices are treated as independent components that can be easily replaced and upgraded.

Business Capabilities

Microservices are very simple and focus on a single capability

REST/RESTful uses?

Microservices can be implemented with or without RESTful APIs. However, it is easier to build loosely coupled microservices using RESTful APIs REST architectural principles makes microservices easier to understand and implement.

Agility

Microservices support agile development. Any new feature can be quickly developed and discarded again.

What do you know about Microservices?

Microservices, aka, Microservice Architecture, is an architectural style that structures an application as a collection of small autonomous services, modeled around a business domain.

Docker

Orchestration, creates a image template for Virtual Machines.

Eureka service

REST based discovery service developed by Netflix, used for load balancing. Service discovery is the automatic detection of devices and services offered by the device.

What is REST/RESTful?

Representational State Transfer (REST)/RESTful web services is architectural style and standard between computer system over the internet to help them communicate. The key idea is that every object has a uniform interface.

Semantic Monitoring

Runs a subset of an application automated tests against the live production system.

What do we need Idempotence for?

We need idempotence at the remote service or data source so that in the cases where it receives the instructions more than once, it only processes it once.

Decoupling

Services within a system are largely decoupled. So the application as a whole can be easily built, altered, and scaled.

SOAP

Simple Object Access Protocol MEssaging protocol for Exchanging structured information in the implementation of web services in a computer networks.

What is Spring Cloud

Spring Cloud Stream App Starters are Spring Boot based Spring integration applications that provide integration with external systems. Spring Cloud Task. A short-lived microservice framework to quickly build applications that perform finite amount of data processing.

Decentralized Governance

The focus is on using the right tool for the right job. That means there is no standardized pattern or any technology pattern. Developers have the freedom to choose the best useful tools to solve their problems.

What is the purpose of Docker?

The packaged product is called a Container. Since it is done by Docker, it is called Docker container! Three main components are: Docker Client Docker daemon or server (REST API) Docker containers

What is Continuous Integration (CI)?

The process of automating the build and testing of code every time a team member commits changes to version controls.

What is a Idempotence?

The property of being able to do something twice in such a way that the end result be the same as if it had been done once only.

The traditional method of message transfer for Kafka?

The traditional method of message transfer includes two method: Queuing: In a queuing, a pool of consumers may read message from th e server and each message goes to one of them. Publish-Subscribe: In this model, emssages are broadcasted to all consumers Kafka caster single consumer abstraction that generlized both of the above - the consumer group.

Major Elements of WSDL

Types Message PortTYpe and Binding

What is UDDI?

UDDI stands for Universal Description, Discovery, and Integration. UDDI is an XML based standard for describing, publishing, and finding Web services.

What are the different types of test for Microservices?

Unit Testing Acceptance Test Performance Testing Exploratory Testing

REST Template

Used to create applications that consume RESTful web Services.

What is WSDL?

WSDL documents provides a structured consumable definition of a SOAP web service. Client application reads the WSDL and use it to generate and validate appropriate calls to the service.

Zuul

Zuul is a JVM based router and server side load balancer from Netflix. Zuul is built to enable dynamic routing, monitoring resilence and security.

Apache Kafka

a publish-subscribe messaging system developed by Apache written in Scala. It is a distributed, partitioned and replicated log service.

Zuul

acts as the API gateway delegates the request to its microservices

What is Sprint Boot?

helps us using the existing spring functionalities more robustly and with minimum efforts.

What is Docker?

provides a container envionment which can be used to host any application of your choice. The software application and the dependencies which support it are tightly packaged together.


Ensembles d'études connexes

Graphing Line and Using Slope Intercept Form

View Set

Principles of Management Chapters 1-5 Quiz Questions

View Set

Research study 10.1 Longsbary (done)

View Set

Chapters 18-20: Cardiovascular System

View Set