Go microservice: API gateways pattern

1. Requirements:

  • Microservice:
  • How many microservices patterns do we have?

2. What we build:

  • This article will focus on building the authentication service which includes login/signup and user profile endpoints.
Postman

3. System architecture:

4. Happy scenario:

  • user registers an account and we save the user information to the local database.
  • user logins and we return a Jwt token.
  • user get their profile by sending the Jwt token.

5. Our microservices:

  • Protobuf:
user.proto
  • Front controller:
  • Entry cache service:
user.go
  • Entry store service:
user_dao.go

7. Conclusion:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Trong Dinh Thai Hoang

Trong Dinh Thai Hoang

39 Followers

I’m a peaceful person who wants to make friend with people around the world.