Master Microservices with Spring Boot and Spring Cloud - Step 12 – Setting Up Dynamic Port in the Response – V2

Master Microservices with Spring Boot and Spring Cloud - Step 12 – Setting Up Dynamic Port in the Response – V2

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial explains how to manage multiple instances of currency conversion and exchange microservices. It covers adding an environment variable to track which instance is responding, using Spring's Environment class to get port values, and running applications on different ports. The tutorial concludes with a summary of the enhancements made to the currency exchange microservice.

Read more

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is it important to know which instance of the currency exchange microservice is responding?

To improve the speed of the response

To reduce the number of instances needed

To verify load balancers and naming are functioning correctly

To ensure the correct currency rates are used

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of adding an environment variable in the currency exchange microservice?

To enhance security

To track the instance providing the response

To store user preferences

To increase the response time

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which class does Spring offer to get the value of the port dynamically?

PortManager

PortHandler

Environment

ServerConfig

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What property name is used to get the local server port in Spring?

instance.port

server.port

local.server.port

application.port

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you run multiple instances of the application on different ports?

By installing the application multiple times

By changing the port in application properties and using run configurations

By modifying the application code

By using different IP addresses

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What command line argument can be used to set the server port when running an instance?

-Cserver.port

-Sserver.port

-Pserver.port

-Dserver.port

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you provide an environment variable for the server port?

It is ignored if application properties are set

It overrides the port configured in application properties

It sets the port to a random value

It causes a conflict with the default port