Building Google Cloud Platform Solutions
上QQ阅读APP看书,第一时间看更新

Considerations when using Cloud Functions

FaaS solutions can very easily magnify challenges often associated with microservices. This is especially true for larger systems that leverage many functions. When implemented correctly, microservices can help minimize the risks associated with introducing changes. However, moving to FaaS solutions generally carries a significant increase in the number of moving parts within a system.

Much of the value of FaaS solutions is the ability to easily reuse services and minimize the duplication of developer efforts. In large systems with many functions, this often means a given function may have many individual clients. As a result, any change to such a service could potentially introduce issues with any one of those clients. Additionally, tracking down the source of any such issue can become more complicated as a given operation may span several layers of functions.

Many of these issues can be addressed with features available in Stackdriver. This includes Cloud Trace for observing how requests propagate across functions, Cloud Logging for aggregating and searching function logs, and Stackdriver Error Reporting for tracking errors as they happen. For more information on the features available in Stackdriver, see Chapter 11, Stackdriver.