# Service and Route concept

**URL:** <https://discuss.konghq.com/t/service-and-route-concept/1711>\
**Category:** Questions\
**Created:** [August 17, 2018, 8:03pm UTC](https://discuss.konghq.com/t/service-and-route-concept/1711 "2018-08-17T20:03:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rana-ahmed](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/rana-ahmed/32/693_2.png) [@rana-ahmed](https://discuss.konghq.com/u/rana-ahmed)\
**Post date:** [August 17, 2018, 8:03pm UTC](https://discuss.konghq.com/t/service-and-route-concept/1711/1 "2018-08-17T20:03:16Z")

</div>

Can anyone help me to understand the concept of service and route. Let’s say I have two micro service  
service user:  
paths:  
GET /users  
POST /users  
GET /users/1  
POST /a-random-uri  
… and goes on  
service comment:  
paths:  
GET /comments  
POST /comments  
GET /comments/1  
POST /a-random-uri

How should I register those service and paths? I’m using 0.14.0

---

<div class="post-metadata">

**Author:** ![thibaultcha](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/thibaultcha/32/340_2.png) [@thibaultcha](https://discuss.konghq.com/u/thibaultcha)\
**Post date:** [August 20, 2018, 4:43am UTC](https://discuss.konghq.com/t/service-and-route-concept/1711/3 "2018-08-20T04:43:08Z")

</div>

How you define your Services and Routes is very much up to you, and how granular you wish to apply plugins to each entity.

1. If both services are available on the same host, and if you were to create a single Service, and a single Route (therefore, a “catch-all” Service/Route), and proxy each request transparently (only the method and path is different for each request), that’d be fine, but you’d be applying plugins to both upstream services unconditionally.
2. If you were to create a separate Service entity for each of your upstream services, you could:  
a. Point each of them to separate upstream hosts, and separate load-balancing pools, as it most likely already should be the case  
b. Apply different sets of plugins for each Service
3. Finally, if you were to create not one, but several Routes for each of these Services (e.g. a `GET /users` and a `POST /users` Routes), then you’d be able to apply plugins even more granularly (i.e. per endpoint) for each of both Services.

We’d recommend to go at least with 2., which should give you enough flexibility in the future if the need shall arise. But ultimately, the choice is yours and depends on your needs and how you see your services’ architecture evolving in the future.

For a better understanding of Plugins granularity, you should know that Plugins can be applied:

- Globally (all requests)
- To a Service
- To a Route
- To a Consumer

The following resources might be helpful too: [https://docs.konghq.com/0.14.x/proxy/#2-plugins-execution](https://docs.konghq.com/0.14.x/proxy/#2-plugins-execution)  
& [https://docs.konghq.com/0.14.x/admin-api/#precedence](https://docs.konghq.com/0.14.x/admin-api/#precedence).

Best,
