Question on the behavior of apigeetool-node for API proxy deployment

Not applicable

My customer has encountered an error of 'status code 500' by running 'apigeetool listdeployments' command.

Error: Error: Error getting virtual host: vhxx for proxy web_entry , status code 500
Error: Error getting virtual host: vhxx for proxy web_entry , status code 500
   at Request._callback (/usr/local/lib/node_modules/apigeetool/lib/commands/parsedeployments.js:209:18)
   at Request.self.callback (/usr/local/lib/node_modules/apigeetool/node_modules/request/request.js:123:22)
   at Request.emit (events.js:110:17)
   at Request.<anonymous> (/usr/local/lib/node_modules/apigeetool/node_modules/request/request.js:1047:14)
   at Request.emit (events.js:129:20)
   at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/apigeetool/node_modules/request/request.js:998:12)
   at IncomingMessage.emit (events.js:129:20)
   at _stream_readable.js:908:16
   at process._tickCallback (node.js:355:11)
...

This could be caused by their network infra possibly having latency by multi-region data centers architecture, since they saw a similar issue of 'Call timed out' against API proxy /deployments URI request called at Management Server on dc1 for Routers and MPs on dc2.

And the measures taken against it is to configure the RPC timeout value changed from 10s to 60s. So, now we want to know whether it's useful also for the apigeetool command. The questions are;

  • Does 'apigeetool listdeployments' internally use RPC communication also?
  • Which of UDP or TCP does the RPC command use for the communication and what are the data passed by the call?
  • Is the API proxy deployment information stored on Cassandra passed through Router/MP called by MS?
  • What exactly is the call timeout measured - is it the duration from the call initiated at MS till the completion of data sent back to MS including the time required to retrieve the data on Cassandra or is it returned without it?
Solved Solved
0 6 312
2 ACCEPTED SOLUTIONS

@Toshihiro Shibamoto - apigeetool listdeployments uses management api call to MS to get the list of deployments.

https://github.com/apigee/apigeetool-node/blob/master/lib/commands/listdeployments.js#L74

It is an HTTP(s) call to api.enterprise.apigee.com.

View solution in original post

@Toshihiro Shibamoto - AFAIK MS does not communicate with MP or R to get the information - it communicates with zookeeper to get deployment information. It is doing this via TCP to port 2181.

apigeeks - I am not 100% on the above, can anyone confirm?

View solution in original post

6 REPLIES 6

@Toshihiro Shibamoto - apigeetool listdeployments uses management api call to MS to get the list of deployments.

https://github.com/apigee/apigeetool-node/blob/master/lib/commands/listdeployments.js#L74

It is an HTTP(s) call to api.enterprise.apigee.com.

Thank you @Ozan Seymen for the reply and the useful information.

I understand now that the question is on Management API call itself for showing the deployments status with using RPC communication to the RMP on a different data center and then the questions become:

  • Which of UDP or TCP does the RPC command use for the communication and what are the data passed by the call?
  • Is the API proxy deployment information stored on Cassandra passed through Router/MP by the call from MS?
  • What exactly is the call timeout measured - is it the duration from the call initiated at MS till the completion of data sent back to MS including the time required to retrieve the data on Cassandra or is it returned without it?

Could you please give me the above information also?

@Toshihiro Shibamoto - AFAIK MS does not communicate with MP or R to get the information - it communicates with zookeeper to get deployment information. It is doing this via TCP to port 2181.

apigeeks - I am not 100% on the above, can anyone confirm?

Not applicable

Hi @Ozan Seymen , Active revisions are stored in ZK where as latest revisions or all deployed revisions related information is stored in Cassandra .

Basically import stores information in C* where as deploy stores information in ZK

MS uses thrift API to talk to C* on 9160.

Yep - that's right. But as the question was about listdeployments, ZK is still the correct component I believe.

Correct as it only returns the active revisions .