Build Your Simple Microservice!

Taufan Fadhilah Iskandar
2 min readDec 3, 2020
Photo by Kaleidico on Unsplash

Have you ever feel your application is hard to maintain? or hard to scale up? if so i suggest you to know what microservice is.

Based on microservice.io, microservice is an architectural style that structures an application as a collection of services that are:
- Highly maintainable and testable
- Loosely coupled
- Independently deployable
- Organized around business capabilities
- Owned by a small team

I can say microservice is a way to split up our modules into services that can scale up based on their focus. In example User Modules, when we migrate into microservice we need to create a new database to store user data and also a dedicated project. So the benefit is we can focus for one service thats make easier to scale up and maintain.

As i mention above, benefit of microservice is we can focus for each service and make easier to scale up and maintain. Of course it has many benefits from server perspective, code perspective, security perspective etc. For the cons, what i feel is we need more resource such as more engineer and more server resource.

So, in this article i will share how i build a simple microservice using different tech stack (Lumen PHP and Express Nodejs). The case is about Property (User have house). We will set Nodejs as a Gateway and User Service, for Property Service we are using Lumen.

The Architecture

Next, i will split into some articles that are:
1. Introduction of Microservice
2. Build API with Lumen for Microservice
3. Build API with Nodejs fro Microservice
4. Build API Gateway with Nodejs for Microservice
5. Using JWT as Authentication in API Gateway

Thats all for the introduction, next we are going to build API with Lumen. Thank you!

--

--