Service-Oriented Architecture and Microservices
36 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is a key characteristic of a Recreate Deployment strategy?

A Recreate Deployment strategy terminates the old version before releasing the new one.

How does a Blue/Green deployment ensure zero-downtime upgrades?

In a Blue/Green deployment, traffic is rerouted to a new version ('Green') while the old version ('Blue') is still running.

Describe the primary purpose of a Canary Release.

A Canary Release allows a new version of an application to be deployed to a small subset of users while the majority continue to use the old version.

What distinguishes A/B Testing from the other deployment strategies mentioned?

<p>A/B Testing involves releasing a new version to a specific subset of users for decision-making based on statistical analysis.</p> Signup and view all the answers

In the context of Shadow deployments, what happens to the incoming traffic?

<p>Incoming traffic is mirrored to the new version without impacting the response of the old version.</p> Signup and view all the answers

What defines a Service Oriented Architecture (SOA)?

<p>SOA is defined as a style of software design where software components are services that interact through a communication protocol over a network.</p> Signup and view all the answers

How do microservices differ from traditional monolithic architectures?

<p>Microservices differ from monolithic architectures by being more fine-grained, independently deployable, and consisting of multiple small deployments instead of a single large deployment.</p> Signup and view all the answers

What is synchronous communication in the context of service architecture?

<p>Synchronous communication occurs when a client makes a request and must wait for the server to fulfill that request before receiving a response.</p> Signup and view all the answers

Describe asynchronous communication in service architecture.

<p>Asynchronous communication allows a client to make a request without waiting for the response, enabling the client to continue processing while the server fulfills the request.</p> Signup and view all the answers

Why are applications in a Service Oriented Architecture often referred to as monoliths?

<p>Applications are referred to as monoliths because they consist of a single, large, and complex deployment that integrates multiple functions and services.</p> Signup and view all the answers

What is one benefit of asynchronous communication in terms of connectivity?

<p>It offers simple, scalable connectivity.</p> Signup and view all the answers

How do microservices differ from traditional SOA regarding the messaging system?

<p>Microservices utilize dumb pipes and smart endpoints, while traditional SOA has smart pipes and dumb endpoints.</p> Signup and view all the answers

What challenge does having separate databases for each microservice introduce?

<p>It introduces eventual consistency as stored data may not always align at a given time.</p> Signup and view all the answers

What role does event logging play in system administration?

<p>Event logging is used to monitor and troubleshoot a system in production.</p> Signup and view all the answers

How does asynchronous communication affect message consumption?

<p>It decouples message rate from consumer availability.</p> Signup and view all the answers

Why is tracing in logging important during development?

<p>Tracing helps developers troubleshoot problems as it provides detailed logs of system behavior.</p> Signup and view all the answers

What are configurable parameters, and where are they defined?

<p>Configurable parameters are defined in configuration files, rather than in the source code.</p> Signup and view all the answers

What is the significance of 'multiple step rollback' in microservices architecture?

<p>It indicates the need to perform manual rollbacks across multiple services in case of failure.</p> Signup and view all the answers

What is the primary purpose of having Configuration Parameters in software?

<p>To provide a single place for modifying configurable aspects without altering the code.</p> Signup and view all the answers

Explain the difference between externalized and centralized configuration.

<p>Externalized configuration can be modified outside the application without a rebuild, while centralized configuration stores all settings in one location for easier management.</p> Signup and view all the answers

What characterizes a Single Page Application (SPA)?

<p>An SPA dynamically updates HTML/CSS using JavaScript while interacting with backend RESTful services.</p> Signup and view all the answers

Why is Docker beneficial for deployment?

<p>Docker standardizes configurations through Dockerfiles and allows easy scaling and management of containerized applications.</p> Signup and view all the answers

How do RESTful APIs benefit from load balancers like NGINX?

<p>Load balancers manage traffic distribution across multiple servers, improving reliability and performance of RESTful APIs.</p> Signup and view all the answers

When would you choose to use Docker Compose?

<p>Docker Compose is ideal for a static number of related services and is often used in development or simple production environments.</p> Signup and view all the answers

What role does container orchestration play in cloud environments?

<p>Container orchestration automates the deployment, scaling, and management of containerized services across clusters.</p> Signup and view all the answers

What is the function of Docker Swarm?

<p>Docker Swarm allows for clustering and managing Docker containers, enabling high availability and scaling.</p> Signup and view all the answers

What architecture does the sample application use for its user interface?

<p>Single Page Application (SPA)</p> Signup and view all the answers

Which database technology is used for data storage in the sample application?

<p>MySQL</p> Signup and view all the answers

What is the primary role of the Receiver component in the sample application?

<p>To handle incoming requests from client applications.</p> Signup and view all the answers

What services are used for logging in the application?

<p>Log Service and Logging with Kafka.</p> Signup and view all the answers

Explain the significance of 'self-contained services' in the context of this sample application.

<p>Self-contained services allow for asynchronous processing, high availability, and scalability.</p> Signup and view all the answers

What role does Docker play in the deployment of the sample application?

<p>Docker is used for containerization of services.</p> Signup and view all the answers

How does the Analyzer service contribute to the overall architecture?

<p>It processes logs to identify anomalies.</p> Signup and view all the answers

What testing tools are mentioned as part of the sample application’s ecosystem?

<p>PostMan and jMeter</p> Signup and view all the answers

What is the purpose of using NGINX in the sample application?

<p>To serve as a reverse proxy and load balancer.</p> Signup and view all the answers

What is the purpose of using 'event sourcing' in the context of the application?

<p>To maintain a log of changes as a source of truth.</p> Signup and view all the answers

Study Notes

Service-Oriented Architecture (SOA)

  • SOA is a software design style.
  • Software components in SOA are services.
  • Services interact through a communication protocol over a network.
  • Traditional systems using SOA decompose into multiple applications, further decomposed into services.
  • These applications are often called monoliths due to their large, single deployment.

Microservices

  • Microservices are a form of SOA.
  • Microservices applications and services are fine-grained and independently deployable.
  • They offer a more granular approach compared to monoliths.

Synchronous vs. Asynchronous Communication

  • Synchronous Communication: A client makes a request and waits for the server to fulfill it before receiving a response. The client thread waits until the server completes all tasks.
  • Asynchronous Communication: A client makes a request and doesn't have to wait for completion before receiving a response.

Benefits of Asynchronous Communication

  • Simple, scalable connectivity
  • Simple, high availability
  • Simple producer/consumer scalability
  • Enables publish-subscribe, message filtering, routing, and fanout
  • Decouples message rate and consumer availability

Asynchronous Communication - Messaging

  • Microservices Principle (e.g., Kafka): Dumb pipes (message brokers) for transport and smart endpoints (services) for logic.
  • Traditional SOA (e.g., RabbitMQ): Smart pipes with complex logic (routing, retries) and dumb endpoints (services) focusing on message processing.

Data Stores

  • Traditional monolithic applications share a single database, enabling strong data integrity constraints.
  • Microservices applications typically have a separate database per service, providing looser coupling and enabling different technology choices.
  • Separate databases add complexity:
    • Eventual consistency: Data may not be immediately consistent across all services.
    • Multiple step rollback: Manual rollback may be necessary if a failure occurs.

Logging

  • Tracing: Developer logging used for development/testing troubleshooting (can be noisy).
  • Event Logging: System administrator logging for production monitoring and troubleshooting (specific messages).

Configuration

  • Configurable parameters are defined in configuration files, not source code.
  • Configuration parameters often include environment settings (URLs, database hostnames), options (e.g., enabling 2FA), and tuning parameters (e.g., login retry count).
  • Centralized configuration makes adjustment easier without modifying source code.
  • Externalized configuration can be modified without rebuilding the application

Single Page Application (SPA) Characteristics

  • Web server serves HTML, CSS, and JavaScript to the browser.
  • JavaScript updates the page based on user actions and server responses.
  • SPA's have a front-end (the SPA itself) and a backend (RESTful services).
  • Developers can specialize in the front-end, backend, or both.

Containerization

  • Docker allows known/standardized configurations.
  • Docker containers can scale up and down dynamically.
  • Platforms like Kubernetes and OKD use Docker images for deployments.

Scaling Services

  • RESTful APIs often use load balancers (e.g., NGINX).
  • Message consumers may use multiple partitions for scaling.

Containerized Deployments

  • Docker: Core for building images and running containers.
  • Docker Compose: Simplifies deployments for related services with static numbers and types.
  • Container Orchestration (e.g., Docker Swarm): Suitable for a large number of services and dynamic scaling.

Deployment Strategies

  • Recreate: Old version is terminated, new version is deployed.
  • Rolling Update: Gradual deployment to servers.
  • Blue/Green: Old and new versions run simultaneously, then traffic is switched to the new version.
  • Canary: A small subset of users receive the new version first.
  • A/B Testing: Comparing two versions of a feature.
  • Shadow: New version runs side-by-side with the old version.

Sample Application

  • Illustration of the typical structure of a microservices architecture.
  • Includes frontend, backend, and various services (receiver, data storage, processing, analyzer services).

Sample Application Deployment

  • Deploys different services in containers.
  • Demonstrates the use of Docker Compose and tools like NGINX, JSON, MySQL, Zookeeper, Kafka for orchestration.

Decomposition into Services

  • Microservices are broken down based on capability/domain (related functionality).
  • Teams own specific microservices.
  • Microservices are self-contained, asynchronous, and highly available.

Microservices - Overall Assessment

  • Advantages of a microservices architecture should be analyzed.
  • Disadvantages of a microservices architecture should be analyzed.

Additional Topics

  • Distributed Tracing: Debugging interactions across multiple services.
  • Service Per Container: Each microservice runs in its own container.
  • API Gateway: A single entry point for all client applications for services.
  • Decomposition by Business Capabilities: Each microservice aligns to a business capability.
  • Decomposition by Team: Each team owns a set of microservices.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Description

This quiz explores the concepts of Service-Oriented Architecture (SOA) and Microservices, highlighting their differences and communication methods. It covers the fundamentals of traditional monolith systems, as well as the benefits of asynchronous communication within these architectures.

More Like This

Use Quizgecko on...
Browser
Browser