Preparation for deploying API services to the cloud (continued...)
This is a continuation of the previous post.
Create pipelines and dashboards for operations: Continuous Integration, Continuous Deployment, and Continuous Monitoring are core aspects of API service deployments. Investment in tools such as log indexing can automate and enable proper alerts and notifications to tend to the services.
A pipeline for staged progression of code to the production environment allows multiple opportunities to test and rollback the changes. The tests can even be mixes from those of other flows so that the code can be vetted against other environmental factors.
The deployment must be automated so that it can be repeated in different stages and environments. With the code propagation streamlined to not require manual intervention, it is possible to have a continuous release.
Each stage or environment in which the code is tested must have a dashboard so that the operations of the code in that environment can be analyzed.
Choices of implementation also improve deployment and operations Let us investigate this a little bit more closely with the following checklist.
Idempotent methods – when changes to the data occur only once, there is very little room for error and costly investigations. This kind of deterministic behavior is easier to test as well.
Authentication – beyond the usual identity determination, provides assurance that the request is not forged and determines the authorization permitted. Very useful for scoping and role-based Access Control which automatically becomes visible in the logs.
Status codes – Created, Accepted, errors. Everyone uses the 200 status code but the use of others helps in the reports rolled up for API response breakouts Keep-Alive – uses the mechanism to specify timeout or the number of requests honored, effectively forcing a handshake after that.
Accept-encoding & Content-Encoding – used to indicate compression and very useful for reducing packet size for listings
Cache-control: no-cache determines server performance in addition to deciding when to reach the backend.
Last-Modified Cache Validation reduces load time and latency on page requests.
Conditional modifications –ETags: full response is avoided by the server if the content has not changed.
No comments:
Post a Comment