Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 793 Bytes

04_external_services.md

File metadata and controls

18 lines (11 loc) · 793 Bytes

4 - External services

Handle external services as external resources of the application.

Examples:

  • database
  • log services
  • ...

This ensure the application is loosely coupled with the services so it can easily switch provider or instance if needed

What does that mean for our application ?

At this point, the only external service the application is using is MongoDB database. The loose coupling is already done by the MONGO_URL used to pass the connection string.

If something wrong happens with our instance of MongoDB (assuming a single instance is used, which is generally a bad idea...), we can easily switch to a new instance, providing a new MONGO_URL environment variable and restarting the application.

Previous - Next