AWS Advice

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:12:10 +0000.
Sender:Victor Franzonatto.
Date:Friday, 15 May 2015 15:32:54 UTC+1.

Hi,

I’m evaluating it in a local environment and I’m very happy with it, but have you any advice of minimum EC2 machines required to run a stable environment using Tyk docker containers?

I’m using Tyk to monitor my API, but there is any advice on how to monitor Tyk resources?

Thanks in advance,
Victor.

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 15 May 2015 15:45:41 UTC+1.

Hi Victor,

Tyk is CPU-bound, so the more CPU’s the better - it will also need Redis, the closer the better - recommend it being Elasticache for scalability.

We benchmarked about 480 requests per second on a 4-core 8GB Tyk node (all in), you may need to tweak some environment variables to get that kind of performance (e.g. tell the Golang runtime to use all the cores, there’s advice on these forums around that). This was a regular install, not dockerised. that might help you decide on a base box to use, I’d be carefull around the t2.small instances or smaller as their network throuput (outbound seems to limit at 180 mb/s which could cause latency. I’d say a t2.medium or higher for production jsut because of the two cores.

Also, depending on how your networking is set up, e.g. if you’re using things like Weave to connect boxes, then expect latency, but otherwise it should be pretty performant.

You can monitor tyk using the healthcheck API (https://tyk.io/v1.6/rest-api/health-checks/), which you could roll into a nagios script or something to make it ore meaningful. In the newest builds (not released yet, but master branch), there’s support for pushing errors to sentry. Apart form that, Cloudwatch is your friend, basically if you’re seeing ~60% CPU utilisation the it’s time to scale out.

Hope that helps :slight_smile:

thanks,
Martin

  • show quoted text -

Imported Google Group message.
Sender:Victor Franzonatto.
Date:Friday, 15 May 2015 15:35:37 UTC+1.

PS.: I want to go live in the next few weeks _o/

  • show quoted text -

Imported Google Group message.
Sender:Victor Franzonatto.
Date:Friday, 15 May 2015 15:45:41 UTC+1.

Hi Victor,

Tyk is CPU-bound, so the more CPU’s the better - it will also need Redis, the closer the better - recommend it being Elasticache for scalability.

We benchmarked about 480 requests per second on a 4-core 8GB Tyk node (all in), you may need to tweak some environment variables to get that kind of performance (e.g. tell the Golang runtime to use all the cores, there’s advice on these forums around that). This was a regular install, not dockerised. that might help you decide on a base box to use, I’d be carefull around the t2.small instances or smaller as their network throuput (outbound seems to limit at 180 mb/s which could cause latency. I’d say a t2.medium or higher for production jsut because of the two cores.

Also, depending on how your networking is set up, e.g. if you’re using things like Weave to connect boxes, then expect latency, but otherwise it should be pretty performant.

You can monitor tyk using the healthcheck API (https://tyk.io/v1.6/rest-api/health-checks/), which you could roll into a nagios script or something to make it ore meaningful. In the newest builds (not released yet, but master branch), there’s support for pushing errors to sentry. Apart form that, Cloudwatch is your friend, basically if you’re seeing ~60% CPU utilisation the it’s time to scale out.

Hope that helps :slight_smile:

thanks,
Martin

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 15 May 2015 15:53:02 UTC+1.

Thanks Martin!!!

  • show quoted text -