During deployment of a large(?) proxy (20+ resources, 40+ policies) I face an issue where the proxy (or rather API) is not available on the production environment for about 2 minutes.
During tests with other proxies and from my experience a proxy response when deployed from the Apigee management UI responses might be delayed by a few seconds but an error is usually not the default response. Is it because of the rather large size of the proxy that a deployment takes too much time so that an error response is sent?
In the documentation I found that there is an option to first deploy the new revision and only then undeploy the previous one ( named as seamless deployment). I assumed this is the default deployment method of also the Apigee Management UI, but I might be wrong?
thanks in advance,
Guy
Solved! Go to Solution.
Thanks @GuyH for posting your question. I was just looking into this a few days trying to narrow the cause of this issue. You're right about the issue you're currently facing, in which there's some downtime when deploying through the UI in certain cases. Please allow me to describe these two scenarios and ways to try to fix it:
Scenario #1: API traffic with downtime
This issue occurs when you make some changes and deploy the same API Revision. AFAIK, currently, deploying the same API Proxy revision without zero downtime is currently not supported. So, essentially this happens when you just make some changes through the UI and hit save button.
Scenario #2: API traffic with zero downtime
In my experience, I was able to workaround the issue above by saving my changes as a new revision, and subsequently deploying the new revision. What this effectively does is to import a new revision and then overriding the previous deployment with the last revision. In this case, if you turn on developer tools, you'll observe that the resource /{apiproxy_name}/revision/{revision_id} with method POST will include the variable mentioned above by @sudheendra1. Check image below.
Other ways to fix this issue in elegant ways:
Since you might be wondering, that eventually you may forget to follow steps from scenario #2. There are ways to always making sure that doesn't happen through usage of offline tools. Enter Apigee Deploy Grunt and Maven Plugins, which currently support this behavior. I'd encourage you to try these plugins, they come with a few more utilities aiming to improve the API Lifecycle and offline development. Please let me know if you have any questions.
@arghya das please correct if I'm missing anything above.