7

This is more about architecture question.

I will be developing microservice in Lumen or Slim, it will not be accessible from the public. The private microservice will be dealing private stuff. Laravel backend will communicate with microservice via REST API (Private / Internal use only). Users will know nothing about microservice.

If Frontend website (public) ever get hacked, it will minimise damage from accessing private stuff on the microservice.

However I want users to use Public API to communicate from public Frontend which then execute requests to microservice. To me this seem to duplicated API Requests - One for Public, and other one for Private (Backend to Microservice)? Or is it nothing wrong with that design?

enter image description here

2 Answers 2

5

This is a pretty solid design.

This way you will have the ability to change or replace your micro-service for something else while the public api will stay the same.

1
  • 1
    hmm theres one too many components talking directly to that DB for me Commented Apr 2, 2017 at 6:56
3

This makes sense if the private API needs to do some things that the public API won't be expected to - such as if you need an admin system of some form, or reporting...

Having the public API call the private ensures most business logic is just in the private API, and not duplicated to other public APIs or sites.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.