Skip to content

Latest commit

 

History

History
80 lines (50 loc) · 2.42 KB

REPORT.md

File metadata and controls

80 lines (50 loc) · 2.42 KB

Lab 6 report

Architecture

Registering services

Warning: The registration service must be running before any registrations can be made. This can be done using the following command:

./gradlew registration:bootRun

To start we launch the accounts (2222) and web services.

  • accounts
./gradlew accounts:bootRun
  • web
./gradlew web:bootRun

In the following image we can see how both services are working correctly at the same time as the registration service.

  • TL (Top Left) terminal: Account service
  • BL (Bottom Left) terminal: Web service
  • R (Right) terminal: Registration service

image

Registration service Proofs

Below is an image showing the correct registration of the services. image

Adding a new service

Now, I proceed to add a new service account (4444).
To do this, the port property located at the following path has been modified: accounts/src/main/resources/application.yml

./gradlew account:bootRun
  • TL (Top Left) terminal: Account (2222) service
  • TR (Top Right) terminal: Account (1111) service
  • BL (Bottom Left) terminal: Web (3333) service
  • BR (Bottom Right) terminal: Registration (4444) service

image

Registration service Proofs

Below is an image showing the correct registration of the services.

image

In this one, we can see how there is one instance for the WEB-SERVICE application and two for the ACCOUNTS-SERVICE one.

image

Shutting down a service

Now, I proceed to shut down the account (2222) service and see how the web (3333) service reacts. For that, I have to press ctrl + c in the account (2222) terminal.

image

Now we can see how the web (3333) service has noticed that the account (2222) service has been stopped.

image

To check that the web (3333) service is working correctly, I accessed the following URL: http://localhost:3333/accounts/123456789 and got the following response:

image

showing that the web (3333) service is working correctly because eureka has detected that the account (2222) service has stopped working and has redirected the request to the account (1111) service.