# Looking for REST-Server making use of Kotlin's Coroutines

**URL:** <https://discuss.kotlinlang.org/t/looking-for-rest-server-making-use-of-kotlins-coroutines/10692>\
**Category:** Uncategorized\
**Created:** [December 9, 2018, 9:56am UTC](https://discuss.kotlinlang.org/t/looking-for-rest-server-making-use-of-kotlins-coroutines/10692 "2018-12-09T09:56:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oliver\_Plohmann](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/oliver_plohmann/32/2398_2.png) [@Oliver\_Plohmann](https://discuss.kotlinlang.org/u/Oliver_Plohmann)\
**Post date:** [December 9, 2018, 9:56am UTC](https://discuss.kotlinlang.org/t/looking-for-rest-server-making-use-of-kotlins-coroutines/10692/1 "2018-12-09T09:56:12Z")

</div>

Hello,

we have a problem with large number of context switches mostly incurred through REST calls (at least context switches rose sharply after we changed to a more microservice-oriented approach using REST calls). Sometimes we have over 50.000 context switches per second.

So I thought a REST-server making use of coroutines to reduce context swichtes would be very useful. Does anyone know whether that exists?

Thanks, Oliver

---

<div class="post-metadata">

**Author:** ![lamba92](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/lamba92/32/5089_2.png) [@lamba92](https://discuss.kotlinlang.org/u/lamba92)\
**Post date:** [December 9, 2018, 1:53pm UTC](https://discuss.kotlinlang.org/t/looking-for-rest-server-making-use-of-kotlins-coroutines/10692/2 "2018-12-09T13:53:39Z")

</div>

Have a look at [Ktor](https://ktor.io) using [CIO](https://ktor.io/servers/configuration.html#cio) engine.  
Additionally you can let [Spring use coroutines](https://github.com/konrad-kaminski/spring-kotlin-coroutine) instead of thread for handling stuff but I never used them so I cannot help you with that.
