APIcast hosted is the best deployment option if you want to launch your API as fast as possible, or if you want to make the minimum infrastructure changes on your side.
- You have reviewed the deployment alternatives and decided to use APIcast hosted to integrate your API with 3scale.
- Your API backend service is accessible over the public Internet (a secure communication will be established to prevent users from bypassing the access control gateway).
- You do not expect demand for your API to exceed the limit of 50,000 hits/day (beyond this, we recommend upgrading to the self-managed gateway).
Step 1: Deploy your API with APIcast hosted in a staging environment
The first step is always to set up your API in the staging environment, where you will define the private base URL and its endpoints, choose the placement of credentials and other configuration details that you can read about here. Once you're done entering your configuration, go ahead and click on Update & Test Staging Configuration button to run a test call that will go through the APIcast staging instance to your API.
If everything was configured correctly, you should see a green confirmation message, and the button that will allow you to deploy APIcast in production will be enabled.
Before moving on to the next step, make sure that you have configured a secret token to be validated by your backend service. You can define the value for the secret token under Authentication Settings. This will ensure that nobody can bypass APIcast's access control.
Step 2: Deploy your API with the APIcast hosted into production
At this point, you’re ready to take your API configuration to a production environment. To deploy your 3scale-hosted APIcast instance, scroll down on the same page, and click the Deploy button.
It will take between 5 and 7 minutes for your configuration to deploy and propagate to all the cloud APIcast instances. During redeployment, your API will not experience any downtime. However, API calls may return different responses depending on which instance serves the call. You’ll know it has been deployed once the diagram on the left has turned green.
Both the staging and production APIcast instances have base URLs on the apicast.io domain. You can easily tell them apart because the staging environment URLs have a staging subdomain. For example:
- staging: https://api-2445581448324.staging.apicast.io:443
- production: https://api-2445581448324.apicast.io:443
Bear in mind
- 50,000 hits/day is the maximum allowed for your API through the APIcast production cloud instance. You can check your API usage in the Analytics section of your Admin Portal.
- There is a hard throttle limit of 20 hits/second on any spike in API traffic.
- Above the throttle limit, APIcast returns a response code of
403. This is the same as the default for an application over rate limits. If you want to differentiate the errors, please check the response body.