Another important factor while scoping microservices is deciding when to pull out the function. If the function is self-sustaining, that is, it has very few dependencies on external functions, it processes a given output and gives out some output. It can then be taken as a microservice boundary and kept as a separate microservice. Common examples are caching, encryption, authorization, authentication, and so on. Our shopping cart has numerous such examples. For example, it can be a central log service, or a price calculation microservice that takes in various inputs, such as product name, customer discounts, and so on, and then calculates the price of the product after applying promotional discounts, if any.