Microservices Architecture Quiz
40 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 are 'dynos' in the context of this platform?

  • Database management systems
  • Physical servers for application hosting
  • Serverless computing components (correct)
  • Integration tools for continuous delivery
  • Which programming languages are supported by the platform?

  • Ruby, Python, and Java only
  • Only Ruby and Python
  • Ruby, Python, Java, Scala, Clojure, and node.js (correct)
  • Java, Scala, and Clojure only
  • What is a key feature of worker dynos?

  • Run computationally intensive tasks outside the web layer (correct)
  • Store database information persistently
  • Execute user HTTP requests directly
  • React to real-time user input immediately
  • What is the pricing structure for dynos?

    <p>Charged per second of usage</p> Signup and view all the answers

    Which service is NOT mentioned as part of the managed support services?

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

    What is the primary advantage of decomposing a monolithic application into microservices?

    <p>Improved resilience and scalability</p> Signup and view all the answers

    Which service is responsible for sending notifications about newly available trips to drivers?

    <p>Driver Management</p> Signup and view all the answers

    What communication method can backend services use besides APIs?

    <p>Asynchronous event-based communication</p> Signup and view all the answers

    How can interfaces be organized in a microservices architecture?

    <p>By splitting interfaces for each type of client</p> Signup and view all the answers

    Which of the following options best describes how functional areas are implemented in a microservices architecture?

    <p>Functional areas are implemented as separate microservices</p> Signup and view all the answers

    What is a primary drawback of clients directly calling multiple microservices?

    <p>Increased dependency on client-side architecture</p> Signup and view all the answers

    Which platform is known for built-in support for micro-service deployment?

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

    What aspect of the client application must change when there is a modification in the microservices?

    <p>The client application's service calls</p> Signup and view all the answers

    What is suggested as a better approach than direct client-to-microservices communication?

    <p>Communicating through a service mesh</p> Signup and view all the answers

    What does runtime support for discovery and configuration facilitate?

    <p>Efficient management of microservices</p> Signup and view all the answers

    What is the primary function of AWS Lambdas?

    <p>To execute code in response to triggers or events</p> Signup and view all the answers

    What is a typical use case for AWS Lambdas?

    <p>Pairing with communication services like SQS or SNS</p> Signup and view all the answers

    Which of the following limitations applies to AWS Lambdas per running instance?

    <p>1,000 maximum concurrent executions</p> Signup and view all the answers

    What is the maximum execution time for an AWS Lambda function?

    <p>300 seconds</p> Signup and view all the answers

    In the provided example, which Python feature is primarily used for generating the response?

    <p>String concatenation with the format method</p> Signup and view all the answers

    What is the rationale behind not including photo resizing in the client event-response loop?

    <p>It could increase response time significantly</p> Signup and view all the answers

    Which programming languages are supported by AWS Lambdas?

    <p>Node.js, Java, Python, Go, C#</p> Signup and view all the answers

    What does Amazon S3 allow users to do?

    <p>Store and retrieve elements using unique keys</p> Signup and view all the answers

    What is a key advantage of using spatial databases in driver management systems?

    <p>They enable efficient queries for locating drivers near passengers.</p> Signup and view all the answers

    What challenge arises from the partitioned database architecture in microservices?

    <p>Difficulty in modifying multiple database entries atomically.</p> Signup and view all the answers

    Which of the following is essential to handle fault tolerance in distributed systems?

    <p>Developing interprocess or event-based communication methods.</p> Signup and view all the answers

    How does the absence of shared state in microservices affect application architecture?

    <p>It necessitates more complex communication protocols.</p> Signup and view all the answers

    What is a potential impact of faults occurring during the interaction of microservices?

    <p>Inconsistency in state across different services.</p> Signup and view all the answers

    What architectural pattern is favored for managing driver, passenger, and trip data in taxi-hailing applications?

    <p>Microservices architecture with partitioned databases.</p> Signup and view all the answers

    Which communication method is recommended for dealing with complex interactions in microservices?

    <p>RPC or event-based communication.</p> Signup and view all the answers

    Which statement best describes the complexity introduced by microservices?

    <p>It requires careful planning for interservice communication.</p> Signup and view all the answers

    What is the primary role of an API Gateway in a microservice architecture?

    <p>To serve as the sole entry point to the microservice ecosystem</p> Signup and view all the answers

    Which of the following functions is NOT typically performed by an API Gateway?

    <p>Data storage</p> Signup and view all the answers

    How many microservices does a client request typically involve when using an API Gateway?

    <p>6 to 7</p> Signup and view all the answers

    What does the API Gateway provide to different types of clients?

    <p>Custom APIs tailored to each client type</p> Signup and view all the answers

    Which of the following is an example of how an API Gateway orchestrates microservices?

    <p>By handling client requests differently based on device type</p> Signup and view all the answers

    Which of the following best describes a primary benefit of using an API Gateway?

    <p>It simplifies load balancing across microservices.</p> Signup and view all the answers

    When can an API Gateway work with multiple microservices?

    <p>In all client requests from various devices</p> Signup and view all the answers

    What is a common communication protocol used by an API Gateway?

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

    Which component of the architecture is directly involved with managing client authentication?

    <p>API Gateway</p> Signup and view all the answers

    Study Notes

    Course Information

    • Course Title: Cloud Computing
    • Course Code: LINFO2145
    • Instructor: Pr. Etienne Rivière
    • Contact Email: [email protected]
    • University: Université catholique de Louvain

    Announcements

    • Project starts this Friday
    • ULB students without Moodle access should provide their GitHub account to TAs in person or by email
    • Peer review for Quiz #1 opens after this lecture
    • Deadline for peer review: Before the next Wednesday's lecture
    • New quiz on lectures 3 and 4 available after the deadline

    Course Objectives

    • Discuss Platform-as-a-Service (PaaS) including development environments and serverless cloud computing
    • Describe service-oriented architectures including classical Web services, REST APIs, microservices, API gateways and service meshs

    Platform-as-a-Service (PaaS)

    • A cloud service model that provides developers with a managed environment for creating and deploying applications
    • Benefits include relief from administration and maintenance tasks like installing and maintaining OS, database servers, web servers (reduced overhead for developers)
    • Less flexible than Infrastructure-as-a-Service (IaaS)
    • Vendor lock-in is greater than with IaaS
    • Easier to relocate virtual machines or containers between IaaS providers compared to specific PaaS platform code

    PaaS Examples

    • Google App Engine
    • Heroku
    • AppFog
    • Engine Yard
    • OpenShift
    • CleverCloud

    Comparing PaaS

    • Comparing PaaS is more complex compared to IaaS
    • No longer solely focused on pricing, security features or machine performance
    • Factors to consider include supported programming languages, libraries, database management systems, communication features, deployment and testing support, cost and billing models

    Google App Engine

    • Provides a complete, managed environment
    • Supports development tools, runtimes, libraries and Operating Systems
    • Primarily designed for distributed web applications
    • Supports Java, Ruby, Python, PHP, Go, and Node.js
    • Applications are designed to be small and stateless, with components that are only invoked when there's an incoming web request
    • Data stored in a managed database
    • Can include IaaS-like usage through containers with arbitrary code functions (using Kubernetes)

    Google App Engine: Pricing

    • Billing based on actual usage per second, with a one-minute minimum charged per hour
    • Pricing per resource:
      • vCPU: $0.0526 per core hour
      • Memory: $0.0071 per GB hour
      • Persistent disk $0.0400 per GB per month
    • Cost for outgoing traffic: $0.12 / GB
    • Shared Google services like caching, email, and libraries charge nothing extra

    Deployment: Google App Engine

    • Use the Google Cloud Platform to create a new project
    • Use the provided SDK to test your application locally
    • Install the SDK for testing applications locally
    • Deploy via command line tool (appcfg.py)

    Python (GAE) - Code Example

    • webapp2 : Depricated GAE web code framework
    • MainPage : Class to handle requests
    • Configuration file (YAML format) including runtime, api_version, threadsafe, handlers ,regexp, and script

    Deployment: Create Project

    • Instructions cover the steps to create a new project on GCP.

    Deployment: Uploading a Project

    • Steps to deploy the application using appcfg.py from the local machine.
    • Requires authentication and uses project IDs.

    Other concepts

    • Discusses deployment best practices
    • Emphasizes considerations for using microservices, including performance and architecture choices
    • Illustrates architectural aspects and considerations in a Cloud Computing context (Scalability cube, Restful APIs)
    • Discusses communication models (one-to-one, one-to-many, synchronous, asynchronous) and implementation details
    • Emphasizes important considerations like service meshes, payloads, and database considerations with microservice architectures.

    Platform-as-a-Service (PaaS) and portability

    • Discussion of portability: running applications built using GAE on a private cloud or moving to an IaaS platform for cost reasons. Introducing an open-source alternative, CapeDwarf, running on WildFly.

    "Serverless" Computing

    • Describes serverless computing as a common form of PaaS
    • Highlights that code does not run directly in thin air but on actual compute resources, with the location not being managed by the user. This includes examples like AWS lambdas, Heroku.

    Heroku

    • Discussion of Heroku's dynos (serverless components).
    • Details on web dynos and worker dynos. Shows execution flow diagrams for different microservice interaction strategies and the advantages and disadvantages
    • Describes the choice between on-demand (cheap, higher latency) and persistent (expensive, better response times)

    AWS Lambdas

    • Discusses how this technology is a mechanism analogous to Heroku’s dynos
    • Describes common use cases: invoking the lambda periodically, in response to external HTTP requests or events
    • Details AWS Lambda limitations including memory, temporary disk usage, and execution time constraints
    • Illustrates Python programming example for lambda functions

    Image Thumbnails

    • Illustrates using Amazon S3 (a key/value store) as the storage for raw images and then generating thumbnails for web display. Explains why putting thumbnail storage and creation within the main client request loop is not efficient.
    • Recommends storing raw images in Amazon S3 bucket and creating thumbnails separately, and then returning thumbnail URLs.

    High-level architecture for AWS Lambdas

    • Visual representation diagram illustrating the interaction between an AWS account user, Amazon S3 buckets, an execution role, and an AWS Lambda function.

    Steps for uploading images and creating thumbnails

    • Details the process of receiving image uploads through a channel
    • Highlights the use of "ObjectCreated" events

    Intermediate conclusion

    • Discusses core design principles of PaaS and serverless models based on the idea of services
    • Shows how an application is formed from a set of services linked through APIs
    • Highlights that these services are designed to scale, and deploy in isolation, characteristics that make them compatible with cloud computing paradigms

    REST Interfaces

    • Introduction to Representational State Transfer (REST), an architectural style for designing web applications
    • Explains REST general guidelines, bottom-up normalization, HTTP 1.1 and URIs

    REST key features

    • Describes uniform interface, statelessness, client-server, and other characteristics of REST
    • Explains resource-based interactions, using URIs to identify "things" and representations for exchanging resource data

    REST API - Uniform Interface

    • Describes the uniform interface within RESTful APIs that utilizes common verbs such as GET, PUT, POST, PATCH, and DELETE
    • Covers the role of the HTTP request method in specifying API operations
    • Discusses the standardization of HTTP responses, including success, error codes, etc.

    HTTP verbs - Semantics

    • Explains how different HTTP verbs are used
    • Describes GET as a read-only operation and POST, PUT, PATCH and DELETE for creating, replacing, updating and deleting items respectively

    HTTP verbs - Example usage

    • Provides examples of how HTTP verbs work in the context of resources (ex: a list of students or a specific student)

    Design effective & safe APIs

    • Discusses importance of resource naming, consistency, idempotent usage of API, rate limits, and secure access with example use cases

    HTTP responses

    • Discusses HTTP response codes and their uses to identify the status of a request or message sent to a server.
    • Explains how those codes are grouped in five families with various intended uses and meanings.

    JSON

    • Describes JSON (JavaScript Object Notation)
    • Highlights its use as a common data format in modern applications, being human-readable and machine-parseable

    Constraint 2 - Statelessness

    • Discusses the lack of session state stored on the server during interactions with RESTful interfaces. Explains why this approach is well suited to a Cloud environment and how it enables scalability.

    Interest of REST APIs

    • Explains the benefit of using REST APIs in an elastic and scalable system and in terms of portability, clarity, and implementation

    REST Maturity Model

    • Details Richardson's model for REST APIs, outlining various maturity levels (0-3)

    Example of RESTful APIs (OpenStack)

    • Illustrates a platform (OpenStack) API using GET/POST/PUT/DELETE examples for launching VMs, creating/editing/removing images, etc.

    Example of OpenStack API use

    • Covers specific examples of calls using curl instructions to interact with a real system (OpenStack)

    Microservices

    • Describes micro services, an architecture focusing on small, interconnected services
    • Explains that each micro-service is implemented as a single functionality
    • Defines important considerations to be mindful of when implementing microservices including: independent databases, separate deployment for new/old service, and different languages/frameworks
    • Uses example of a taxi-hailing application

    Monothic vs. Microservices Application Structure

    • Presents diagrams describing typical architectures for an application before (monolithic) and after (microservices) implementing design principles, and presents the differences in complexity

    Advantages of a monolith

    • Shows the benefits of a monolithic architecture from a developer's perspective (simplicity of deployment + tooling support - IDEs, etc.) and the advantages of a shared programming language, or how to deploy.

    Monothic Hell (1 & 2)

    • Shows the disadvantages or limitations to a monolith from the view point of a developer (complexity in scaling up, adding features and maintenance) and a DevOps/Operations person (complexity in deployment time, scaling and resource allocation)

    Microservices Communication

    • Highlights the various strategies used to communicate between microservices such as synchronous and asynchronous communication styles, direct from client and through API Gateways, or through message driven architectures

    API Gateways

    • Explains that a specific microservice will act as the sole entry point into your system (an API Gateway)
    • Discusses how API gatekeeps knowledge of the inner system's architecture
    • Explains the benefits of using API gateways, including encapsulation and centralized control of communication

    Interaction Styles

    • Highlights "one-to-one" interactions where each client request generates a processing instance by just one service
    • Describes "one-to-many" interactions where a single request gets handled by several services
    • Discusses synchronous (blocking, fast) and asynchronous communication modes (non-blocking)

    Mixing Interaction Styles

    • Shows a visual representation of how to implement various interactions styles in order to communicate between several microservices
    • Discusses synchronous, event-based interactions, and how these are applied in scenarios

    Synchronous Request/Response

    • Explores using REST over HTTP and the overhead added, emphasizing better, more efficient approaches such as RPC and other options (Thrift) for data communication between services. Explains how these communication technologies offer different levels of direct communication
    • Shows how Thrift can be utilized as a language-neutral solution

    Asynchronous communication, event-based

    • Discusses client-service communication where events are triggered by clients.
    • Explains that once the event has been sent, the client does not wait for feedback or a response, but continues its execution and receives feedback via events or messages.
    • Explains the role of communication channels in asynchronous event-based communication
    • Explains the use of message brokers

    Payload formats

    • Discusses various payload formats for exchanging data, such as JSON, XML, structured binary formats (Protocol Buffers and Avro)

    Service Meshes

    • Explains the concept with use cases and details on how a service mesh can help maintain performance consistency while handling communication between microservices
    • Highlights the benefits in cloud deployments and management of different instances and nodes
    • Explains the use cases and describes various concepts used in microservices implementation

    Conclusion

    • Summarizes the benefits of using PaaS and microservices in the Cloud, including features such as serverless computing, well-suited implementation for operations tasks, compatibility with containers, and various benefits from a scalability perspective.

    Additional resources

    • Lists supplementary learning materials, including videos by industry experts, and ebooks

    Studying That Suits You

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

    Quiz Team

    Related Documents

    Description

    Test your knowledge on microservices architecture and dynos management in cloud platforms. This quiz covers topics like programming languages, pricing structures, and communication methods within microservices. Perfect for developers looking to deepen their understanding of modern application deployment techniques.

    More Like This

    Microservices Architecture Fundamentals
    16 questions
    Microservices et Cloud Computing
    45 questions
    Architecture Microservices et Scalabilité
    44 questions
    AWS X-Ray and Microservices Architecture Quiz
    45 questions
    Use Quizgecko on...
    Browser
    Browser