Monday, March 8, 2021

  Preparation for deploying API services to the cloud (continued...)

This is a continuation of the previous post

  1. 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. 


  1. 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.  


  1. 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. 


  1. 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. 


  1. Choices of implementation also improve deployment and operations Let us investigate this a little bit more closely with the following checklist.  


  1. 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. 


  1. 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.  


  1. 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.  


  1. Accept-encoding & Content-Encoding – used to indicate compression and very useful for reducing packet size for listings  


  1. Cache-control: no-cache determines server performance in addition to deciding when to reach the backend.  


  1. Last-Modified Cache Validation reduces load time and latency on page requests.  


  1. Conditional modifications –ETags: full response is avoided by the server if the content has not changed.  

No comments:

Post a Comment