cofacts / rumors-api

GraphQL API server for clients like rumors-site and rumors-line-bot
https://api.cofacts.tw
MIT License
109 stars 26 forks source link

API can determine its concurrency using WEB_CONCURRENCY env var #216

Closed MrOrz closed 4 years ago

MrOrz commented 4 years ago

As-is

PM2 always spins up 2 instances of rumors-api

To-be

PM2 will respect WEB_CONCURRENCY env var to determine its concurrency, which is consistent with cofacts/rumors-site.

This can be helpful if we want to scale up / down API servers on production server.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 88.582% when pulling 784d6dcc70a4ed08f11c0f533a211c48163ec004 on web-concurrency into a9a68b9d1d5a3b75a32b021c8b799dd58c1fb01c on master.