1 Introduction

In recent years, cloud computing has changed the paradigm of computation by provisioning various services through the Internet and appeared as a new pattern for flexible and comprehensive service provisioning to users and various companies. Cloud computing technology includes a logical set of unlimited infrastructures that is available everywhere and could be accessed by different organizations and individuals all around the world through the Internet. Infrastructures are provided in form of VMs by the cloud service providers to customers. Although unlimited resources are promised to customers, the cloud service providers cannot respond to all requests of users due to limited capacity which reduces the number of services accepted and provided by them. They should be able to increase their resources to provide cloud services to unlimited requests by the service providers [2, 3]. This can be done by connecting the infrastructure of various providers by cloud federation formation to provide the possibility of sharing resources between them. Cloud federation enables the providers to provide unprecedented resources and in the end, satisfy the promised QoS. They could also promote the scalability and accessibility parameters through participation in the federation. In addition to the above benefits, cloud federation formation enables the providers to share the idle or rarely used computing resources with their counterparts at the time of resource deficiency and obtain extra income and make it possible for the providers with extra workload to divide their load between other providers that are members of that federation [4].

Participation in the federation has three main advantages for the cloud service providers. Firstly, the provider does not suffer losses due to complete rejection of the request, and secondly, it can build a good reputation due to responding to the requests and its reputation is not tarnished among customers due to non-response [1]. In addition, members of the federation could utilize surplus resources and lease them to other members and make a profit as maintaining the idle resources is costly for the service provider [5]. The other advantage of cloud federation is high fault tolerance to the extent that with the failure of a server, the federation still works and other providers respond to the requests; therefore, the accessibility which is one of the main QoS parameters increases. Another advantage of the cloud federation is the elimination of lock-in. The cloud federation does not confront the lock-in problem, i.e., the service provider cannot make the customer dependent on itself as there are several providers in the cloud federation that provide services with different prices and qualities, and requests are not managed by one server [2].

1.1 Motivation

Resource management is an important task in cloud federation that should be analyzed since most problems are due to oversupply and deficiency of resources and management of providers’ resources to respond to the requests of the consumers is a big challenge [3], and the success of cloud computing depends on good resource management of cloud service providers to provide a reliable federation to offer proper services to daily, scientific and engineering applications [4]. No data center provides unlimited resources for dynamic scalability, so the shared resources of cloud service providers must be managed to maximize the use of cloud service providers. Resource management in cloud federation includes four parts of discovery, selection, pricing, and resource allocation [5, 6]. Pricing is one of the procedures of resource management that promote cloud federation SLA and maximizes the profit of federation members and increases customer satisfaction [7]. Moreover, using proper pricing, it is possible to optimize resource utilization, i.e., the benefits of the cloud federation are realized when the members of federation can provide shared resources in accordance with the requests and avoid resource excess or scarcity[8]. Therefore, one solution for optimal use of resources and maximizing the profit of service providers is to improve the method of resource pricing. In addition, pricing is an important factor in cloud federation environment to encourage the sharing of resources between providers since the customers’ bills and the revenue of participating providers are calculated based on the pricing mechanisms used and the user prefers to request resources from cloud service provider (CSP) which ensures the calculation of fair bill based on the use of resources [9].

In recent years, various studies have been carried out by researchers based on service pricing in cloud computing for optimal use of service providers’ resources, maximum profit, and cost reduction. One of the main pricing methods is the use of game theory and auction which is used in cloud computing for pricing and resource management [10]. In addition, researchers have used innovative and meta-heuristic algorithms for pricing. We can categorize the researches presented into two approaches of maximum profit and optimal use of resources. The maximum profit approach is presented for maximizing the profit of service providers or reducing their cost, and in the optimum use approach, the researchers try to make maximum use of computing resources using the pricing method.

Auction mechanisms cannot be directly used for cloud federation scenarios where there are various providers of diverse services as they have the problem of efficiency and honesty. In addition, heuristic and meta-heuristic methods do not evaluate the service providers, and in the resource demand pricing process, the cost of resources, the resource requests, and the number of shared resources are not evaluated in a unit model, and the performance of the service providers is not periodically investigated. Moreover, the necessary recommendations are not made as to the optimization of shared resources including the change in shared resources and price variation for optimum use of resources. In addition, proper price is not offered to the cloud service providers by the federation in proportion to the requests and the resource consumption.

Based on this, we decided to consider several criteria for evaluation of the members of the federation, simultaneously including cost, price, amount of shared resources, and service request of the service provider. Therefore, we considered cost, price, and share resources together to evaluate the cloud service provider in the federation and evaluated the status of the provider using these criteria and inspired by the theory of macroeconomic. Then, we presented a heuristic algorithm to offer an appropriate price of service to the cloud service provider in the cloud federation where the proposed algorithm proposes a method for optimum use of shared resources to the cloud service providers. Therefore, based on the results of the evaluation, the proposed algorithm periodically offers the price proportionate to the request and the number of shared resources to the cloud service providers. Moreover, the proposed algorithm is able to periodically adjust the amount of request for the cloud service provider by changing the service price.

1.2 Contribution

We intend to make optimal use of resources and maximize the profit of the cloud service providers and welfare of customers which consequently leads to better reputation and increased QoS. In this regard, we consider a period for evaluation of cloud federation and distribute the requests between cloud federation providers based on cost and price of service during the distribution period. Then, inspired by the macroeconomic evaluation methods during the evaluation period, we evaluate the status of service providers through an evaluation-based method. At the end of the period, the status of each provider is expressed based on the numerical value, and the necessary recommendations on price increase or decrease are presented to the service provider for optimum use of resources and maximum profit of the next period according to the evaluation parameters of each period. The aim of this approach is to make the service providers in the federation gain maximum use of shared resources using the proposed price and the service consumers get the services at a fair price.

The main contribution of this paper is in two ways:

  • Evaluating service providers based on macroeconomic concepts

In this section, the service provider is evaluated based on some evaluation criteria including price, cost, and shared resources of the provider along with requests of the service providers which includes several requests in the proposed model.

  • Providing proposed algorithm for price proposal based on evaluation results

Using the evaluation results, the new price will be presented using the proposed algorithm for optimum use.

2 Related works

In this part, a review of related works on cloud federation formation is presented to this end, first, we review some papers that deal with the service provisioning in cloud computing and classify them, then extract the pricing criteria from them. At the next stage, we classify the paper with respect to the pricing criteria and discuss them. There might be more than one criterion for pricing in a paper; therefore, we consider the one with the highest influence for classification purposes.

As previously mentioned, the researchers have considered objectives for pricing the service, the most important of which is an optimal use of computing resources, cost minimization, and profit maximization [11]. For example, if the objective is an optimal use of resources, it means that pricing provides the best resource allocation for service providers. As another example, if the objective is profit maximization for service providers, then service pricing will create maximum profit along with cost minimization or presenting the optimum price. Based on this, the objectives that we have extracted include optimal use of resources and profit maximization which we have classified into two approaches of profit maximization and resource management.

2.1 Profit maximization approach

In paper [12], the objective is revenue maximization for both IaaS and SaaS providers in resource provisioning for users. In cloud computing model, IaaS providers seek to possibly earn extra profit as well as cover their operation cost. Therefore, IaaS providers seek optimal prices in time for various types of virtual machine samples to maximize their revenue. The objective of each SaaS provider is to minimize its cost by determining the optimal number of virtual machines to be purchased. Meanwhile, each SaaS provider should be compatible with SLA contract which affects the income based on obtained performance level. In this paper, the problem of revenue maximization is modeled as Stackelberg game. In paper [13], pricing mechanisms for virtual machines have been provided based on the demand requested by local users and peer CSPs. In this paper, the equations for the calculation of customers’ invoices revenue earned by partner CSPs are also formalized based on the proposed pricing mechanisms. The proposed mechanisms ensure fair invoicing for resource-seeking customers and a fair and profitable distribution of revenue to participating CSPs. In addition, they encourage the participation of resources and CSPs in the federation.

In paper [14], the framework of cloud federation formation is modeled where the request is performed by a user (like a big company) to the cloud broker which requires some computing resources, and a service provider. Here, it is assumed that a service provider cannot satisfy the requests of the cloud user resources and a federation with other existing CSPs is required to provide the requested resources to the cloud users. Thus, the provider is required to find the best service provider collection from among other existing providers (who are interested in participating in the federation) for federation formation. In addition, the problem of cloud federation formation is modeled as a multi-objective optimization problem with an exchange between profit and QoS.

The main purpose of this article is the optimal balance of the overall profit and the QoS of the formed federation, and at the same time considering the brand value of each service provider. The proposed mechanism distributes the profits of service providers in the federation based on their share in the federation and proves that the individual profit that the service providers make in the federation is always greater than the profit they earn when they are not part of a federation. In addition, they have done the first work in this area, which considers QoS, the profit and brand value of the federation, and the relevant member CSPs. The authors have proposed an algorithm based on ILP for the formation of the best federation. Moreover, they have proposed a heuristic algorithm for cloud federation formation following ILP and their model. In [15], Mishra et al. modeled the needs of customer vehicles by consideration of QoS and the requirements of reputation and the price for the services used in form of a useful function. The usefulness of supplier vehicles is modeled as the cost of services they provide and the price they receive in return. Therefore, the mechanism of the first auction is proposed to decide on the pricing of supplier vehicle resources with consideration of current market demand and service quality. In addition, the auction mechanism is designed to provide maximum profitability for consumer vehicles while taking into account the reputation of supplier vehicles. The cost of supplying resources by the supplier vehicle is uniformly distributed in this work.

In paper [16], the efficiency of the market-based cloud pricing strategy is examined by presenting the mechanism of mobile vehicles’ auction which balances the profit of users and cloud service providers. Multiple users request services simultaneously and place their QoS suggestions and requirements in the cloud. On the one hand, each user pays for allocated cloud resources only when their QoS needs are met by the cloud service provider.

On the other hand, the cloud service provider receives service suggestions from users and then makes a decision for competitive pricing in cloud resources to call the maximum number of users in the cloud. The user is motivated to outsource their application to the cloud, as the maximum net profit is based on their proposed budget and QoS requirements. The cost of energy incurred by exploiting cloud infrastructure is also accepted as an important consideration that affects pricing regulation. The price and cost of the resource must be higher than the cost and guarantee a specific interest rate that is determined by the cloud service provider. Offering services with a budget less than the cost will not be accepted by the cloud service provider. In short, the purpose of the auction mechanism of the services provided is to motivate the maximum number of users to host their applications in the cloud, while a minimum profitability goal must be guaranteed. In this way, the proposed cloud ecosystem strikes a balance between the interests of users and the cloud service provider. In order to develop a strong resource auction mechanism, it is essential to meet the characteristics of budget balance, honesty, envy, and jealousy. When designing the resource auction mechanism, the budget balance is usually considered as an initial demand. This method claims that the proposed budget of a user is always sufficient to cover the payment of his services. Otherwise, the proposed auction mechanism is invalid. In addition, the cloud service provider must pay attention to the fraudulent behavior of users. One common fraudulent behavior may be misreporting the proposed budget in an attempt to allocate more cloud resources and achieve a higher quality of service. Hence, the resource auction mechanism must provide the right guarantee, which eliminates the opportunistic incentive to misreport the proposed budget.

Cong et al. [17] have developed a personality-guided prediction model for the value perceived by the new user. The perceived value prediction model models the relationship between service price, service quality, individual personality, and user satisfaction to predict changes in user-perceived values with respect to cloud services. A dynamic cloud pricing strategy based on reinforcement learning and based on a personality-guided value-prediction model has been proposed. This pricing strategy could make consecutive cloud pricing decisions for optimization of the profit of cloud providers and users’ Meng, Q.N et al. [18] proposed a pricing model to describe pricing mechanism in a cloud production environment. This model facilitates the service pricing for prediction of service or product price in terms of payment paradigm in respect to using the service provider approach and presents the classification of valuation criteria to measure the value and cost of a service or product in design, construction, and service provisioning procedures. In addition, it proposes a parametric pricing approach for price forecast based on pricing factors provided by the criteria classification.

2.2 Resource management approach

Although various pricing mechanisms have been proposed in recent years, a few of them deal with the competitive behaviors between different ISPs, especially in terms of the resource pricing mechanisms. Ying Hu et al. [2] have mainly focused on the competition between several ISPs which usually constitute a federal cloud market. Modeling the competition involves the description of user choice behavior and the development of dynamic pricing strategies of providers to adapt to the market condition. To describe the user-selected behavior, a tool function has been used whose value is obtained using the resources requested by the providers. The possibility of the user being selected to provide services by a particular provider is extracted from the tool function. Then, the probability of being selected by the provider is used to determine the optimal pricing policy. They have addressed the problem of collaboration between ISPs using learning curves to model the cost of providers’ operations and then introduced a new algorithm that determines the structure of collaboration. The collaboration decision algorithm utilizes the operation cost calculated based on the learning curve and pricing policies obtained from the competition as parameters to calculate the final revenue at the time of outsourcing through meeting the requests of users’ resources.

In [3], Mauro Femminella et al. discussed the service price and pricing standards in the cloud space as these services are utilized to implement IoT applications that produce big data. Then, a solution is proposed to investigate the emerging problems which increase the scalability of cloud computing services. Concerning their previous paper, they presented a comprehensive explanation of the system model through a precise case study to better show the proposed concepts. V Pradeep Kumar et al. [6] precisely studied the use of resources and pricing with various factors such as QoS and SLA violation. They presented an agent-based layer and discussed the considered system model with the EM algorithm. Zang et al. [8] proposed a practical random online reserve scheme for users to minimize the cost of the reserve scheme by describing the reserve strategy of the user scheme with different prices of the mixed schemes. This scheme does not require any data about the future and is compatible with the explosive and unpredictable nature of multimedia traffic. They theoretically analyzed the problem of online shared source reserve and claim that the proposed random online reserve scheme achieves the minimum competitive cost between online algorithms in all pricing items. The threshold value derived for the price of a mixed scheme guarantees that the mixed scheme is more attractive than individual schemes and will be useful for designing the mixed scheme pricing.

In [10], Sun et al. proposed a price-aware congestion control protocol for IaaS cloud services to overcome the deficiencies of the network pricing solutions. An optimal congestion control protocol is based on maximizing the network tools. This service supports three different support service classes, i.e., best attempt, distinct services, and minimum guaranteed rate services. Three types of services are activated when adjusting the proper values of a pair of parameters, i.e., minimum guaranteed rate and desired weight which is determined through the paid flow price for services. In this paper, they proposed two pricing models, i.e., a pricing model based on coarse-grained VM and fine-grain flow. A client pays a certain amount for purchasing an intended service and the given values of the parameter pair are mapped to the protocol, which uses the TCP tool function, and therefore is a TCP-friendly protocol.

In [19], Mashayekhy et al. introduced a graphic game of coalition to form a cloud federation that guarantees SLA based on direct interaction between cloud providers and uses a penalty mechanism. In contrast, the broker is responsible for evaluating the resources of the cloud federation in the proposed method. Furthermore, in each period, based on this evaluation, he provides the best forecast of resource consumption in the future without consideration of any penalty for the members of the federation. Using the forecast of resource consumption in future periods, they better commit to their obligations.

3 Summary

The investigations have dealt with service pricing based on auction method, game theory, multi-objective optimization problem, proposed algorithm, reinforcement learning, and innovative methods. In papers [12, 15, 16] game theory and auction have been used for pricing purposes. Papers [13, 20,21,22] have presented the proposed algorithm for the pricing problem. In [14, 23] papers, multi-objective optimization problems based on integer linear programming and online optimization problem are proposed. Papers [17, 18] have used intelligent methods for pricing. In addition, in paper [24], a congestion-aware protocol has been provided for this problem.

However, our proposed method has three major differences from previous methods. First, our proposed method evaluates the cloud providers with cost, profit maximization, and shared resources using economic concepts in certain time periods. The second difference is that we can propose the prices in proportionate to the consumption of the current period to the providers to determine the price based on the request. The third difference is that in our proposed method, the use of resources is determined through evaluation, and it would be possible to provide the best resources for each provider in the future.

4 Background

4.1 Economic evaluation

In this part, we explain the theoretical basis which is discussed in this paper. To this end, first, the evaluation method will be examined in an economic system and then explained.

Supply and demand are the main parts of economic evaluation that are done to investigate the status of a product or service. Using a supply and demand chart, we can determine the equilibrium price and quantity for a certain product. This method is useful for checking the price and quantity of a product or service. However, if we want to examine demand in an economic complex such as a country that produces a variety of goods and services, we use macroeconomic methods. In this method, the demand function is defined in a different manner than the conventional demand, in which the defined demand function is equivalent to income, and for a country, it is defined as Eq. 1, where the right side of the equation is the equivalent of demand and the left is the equivalent of income, i.e., the demand for goods or services generates revenue for a system. [25]

$$Y = C + G + I + X - IM.$$
(1)

The demand side, for a country, is made up of four main parts: \(C\) is the consumption; Eq. (1) is known in economics as demand-income, the left side shows the income and the right side, the demand. One of the main parts of demand is investment, i.e., some units of goods and services are produced in a period in economy that is demand for investment. The invested goods and services are consumed in other quadruple sections of demand and converted to income that are: goods or services. Each country uses part of its production domestically. \(G\) is the consumption of the government, i.e., another part of the services and goods are consumed by the government. \(X\) is equivalent to consumption in form of exports of goods and services, and \(IM\) is equivalent to imports of goods and services from other countries, which is indicated by a negative sign as we shall pay to other countries for importing goods and services. The other part is demand I, which is the most important part of the demand, and at the beginning of an economic period, it is equivalent to the demand for the production of goods and services that are produced in a country. Therefore, in macroeconomics, demand consists of production and consumption, where C, G, X, and IM are demand for consumption and \(I\) is equivalent to demand for investment or production, i.e., production where I is consumed by other parts of the demand function and generates revenue for a system. From another approach, the demand function is constituted from independent and dependent variables. Investment is an independent variable, and other parts of the demand-income function are dependent variables. For example, if 100 units of goods and services are produced in a certain time in a country and 10 units are for consumption, 20 units for export, 30 units for government and import is zero, then the income is equal to selling 70 units, and we have 30 units of unused production. At the end of the studied period, the economic system earns equal to 70 units and 30 units of products and services remained unused. Consumption might be equal to 100 units or even there might be more than 100 units of demand for consumption.

The main point is that we have considered demand function for a country which is a more general equation, but we could use it for any economic system. For example, we could ignore government, import, and export shares and write the demand-income function as Eq. 2 [25].

$$Y \, = \, C + I.$$
(2)

In addition to the demand-income function, there is another main relation in a macroeconomic which is demand for money, i.e., how much money is required for an economic system. To this end, the amount of demanded money is divided into realistic and unrealistic demand. Speculative demand is equal to unrealistic demand which is not considered. Instead, the real demand for money is denoted by M and the demand for money by Eq. 3 [25].

$$M/p \, = \, k\left( y \right).$$
(3)

In Eq. 3, \(p\) is the average price in a period and \(k\) is constant coefficient used for the evaluation of an economic system. Therefore, the maximum demand of money to the average price equals k times income. M is the equivalent to the total value of goods and services in a period that is a constant value. In addition, the average price is also fixed during the period.

The evaluation of the economic system is done using the demand-income and money demand functions. To this end, several consecutive evaluation periods are considered. At the beginning of each period, the initial investment is made, and during the period, if the goods and services are not enough, the investment increases. Then, after several consecutive periods of equilibrium, two functions of demand-income and money demand are drawn. Based on them, the equilibrium point of the economic system is obtained, which is a criterion for examining the status of that system.

First, we analyze the demand-income function based on investment, in which the investment balance at the end of the period is inversely proportional to income. In other words, if the investment balance at the end of the period is positive, then the income is less than the investment, and vice versa, if the investment balance at the end of the period is negative or zero, it means that the income is more or equal to the investment. So, the demand-income function is inversely proportional to the investment balance at the end of the period. However, income balance and money demand have a direct relation. The reason is that the ratio of money to the average numerical price is constant, and in order for the second side of Eq. 3 to be constant, the increase or decrease in income must be adjusted. In other words, income is directly related to investment balance in relation 3. That is, if we calculate the linear relation between income and investment balance, then the slope in the demand-income function would be negative and in money, demand would be positive. In other words, we could calculate the equilibrium point of an economic system by drawing the slope of income line and investment balance for demand-income and money demand in a unit chart.

5 The proposed approach

In this section, we present a method for request distribution, pricing, and resource management for members of cloud federation based on the periodic evaluation. The periodic evaluation specifies the status of using resources for providers in each period, and the proposed price mechanism is proposed to the providers based on the evaluation result which leads to optimal use of resources as well as determination of optimal price. In the following, the equations required for distribution of requests among members of the federation, evaluation of federation members, and the proposed price mechanism are presented. In the end, the price proposition algorithm for optimal use of resources in the federation is presented.

5.1 The pricing framework and optimal use of resources

In order to solve the problem of optimal use of resources using a specified pricing method, we proposed a method for pricing based on providers’ evaluation. Therefore, first, the general architecture of the framework is presented, then the service provider and federation architecture are defined, and finally, pricing based on optimal use of resources, where the server evaluation is performed, is explained.

To this end, a main evaluation period is determined where the requests are presented to the cloud service provider (CSPs) by the broker. Each CSP prepares some virtual machines of CPU and GPU types and declares it to the broker at the beginning of the period that is equivalent to investment of one CSP. In addition, the cost and price of virtual machine is declared to the broker by the CSP. The broker allocates the CSP virtual machines to the requests and converts it to revenue based on CSP. Therefore, the relation between the income earned from the period and the provided (invested) resources is expressed as Eq. 4, where revenue allocation and provision correspond to the reserved (invested) resources of CSP.

$$Allocation{ } = { }Provision{ } + { }Brk.$$
(4)

Equation 4 corresponds to Eq. 1 in Sect. 3.1, where allocation is equivalent to revenue and provision to investment. The other part of demand is broker’s demand which gets the requests from the users and sends them to CSPs, which is represented as \(Brk\), i.e., the produced virtual machines are consumed by the users’ demand and converted to revenue for CSP. The other parts of Eq. 1 are neglected. This is also true in economic systems, i.e., an economic system might have no relation with other systems, and there would be no import and export between them.

As far as revenue is not always equivalent to investment and the whole invested resources might not be sold, it is required to modify the investment which is represented by Eq. 5 for a period.

$$Allocation = \Pr ovision {-} alpha*coefficient\_income.$$
(5)

In this equation, \(alpha\) is constant which is considered for simplicity in calculation; however, \(coefficient\_income\) is the rate in economy and is obtained based in linear regression between revenues and the investment balance in a period. That is, we determine the investment balance after each request and obtain the revenue at the end of period based on linear regression for the requests and show it with \(coefficient\_income\); where the \(coefficient\_income\) at the end of a period has reverse relation with the revenue.

In following, we define the expected CSP revenue for the same requests according to Eq. 3 in economy and show it through equation.

$$\left( {\Pr ovision/mean\_price} \right) = k \left( {Allocation} \right).$$
(6)

In Eq. 6, the provision to the average price ratio equals to the money that CSP expects to receive and is k-times of the revenue. On the other hand, as there is not always an equal relationship in the above equation, we calculate it through \(beta\) constant coefficient and linear regression as Eq. 6 and show it as Eq. 7.

$$\left( {\Pr ovision/mean\_price} \right) = k\left( {allocation} \right) {-} beta* coefficient\_income.$$
(7)

As Eq. 7 shows, \(coefficient\_income\) has direct relation with allocation; therefore, we can express the relation between allocation and \(coefficient\_income\) through two separate relations by considering the investment and price average as constant for a period, where the allocation and \(coefficient\_income\) have direct and reverse relation and are shown in a graph. Then, we obtain the equilibrium \(coefficient\_income\) from their intersection, where the positive equilibrium coefficient indicates resource surplus and the negative equilibrium coefficient indicates the resource deficiency. If we intend to decrease the resource surplus, we continue the evaluation process by balancing the resources of main period in other periods to reach ideal provision. On the other hand, when we have resource deficiency, we can increase the resource price in proportionate to the equilibrium rate to control the requests.

5.1.1 Architecture

The proposed architecture is proposed in three layers of cloud, broker, and user. The cloud layer includes cloud service providers who share the resources for provisioning services. The broker is the middle part of the proposed architecture that receives the requests from the users and classifies them. Then, it distributes the requests between members of the federation. In addition, the broker determines the time interval for evaluation and gets the shared resources from the federation members at the beginning of the interval, and performs the evaluation of federation members during the period and then determines the result of evaluation at the end of the period for the providers, separately and proposes the appropriate price for optimal use in the future period to service providers. In Fig. 1, we have presented the layout of the architecture for the federation including CSPs, where the number of CSPs is not limited and can be increased or decreased. In addition, each CSP is evaluated independently of others; however, the distribution of requests between several CSPs is done based on the presented model, where the cost, price and the number of virtual machines are the criteria for delivering the request to CSP.

Fig. 1
figure 1

Proposed architecture

As seen in Fig. 1, each layer contains some objects that are interrelated. The sequence of workflow in layers is shown in Fig. 2.

Fig. 2
figure 2

Sequence of work flow

5.1.2 Cloud service provider

In our proposed architecture, the cloud service provider (CSP) includes some VMs for which cost and price are considered and the provider earns profit by selling them.

  1. 1.

    Virtual machine: The cloud service provider packages the cloud resources like a virtual machines. As far as the service providers are of IAAS type, the virtual machine includes storage, memory, and CPU or GPU, and seven types of virtual machines are prepared in the service provider including LARGE, MEDIUM, SMALL, and XLARGE for cpu-base. In addition, the cloud service provider provides three types of GPU-enabled virtual machines for the users including NC6, NC12, and NC 24.

  2. 2.

    Cost of virtual machine: In the proposed architecture, the cost of virtual machines of the service providers is determined for four types of virtual machines and three types of GPU-enabled virtual machines. For example, the service provider cost sample can include the cost of infrastructure, energy, maintenance, and other costs.

  3. 3.

    Price of virtual machine: In the proposed architecture, the price of the virtual machine of the service provider is presented through a set that includes the price of seven types of virtual machines.

  4. 4.

    The Profit of virtual machine: The service provider expects to achieve a certain profit from selling each virtual machine in proportion to cost and price.

  5. 5.

    Shared resources: Shared resources include some virtual machines that the service provider presents to participate in the federation.

5.1.3 Broker

Broker is where the price is proposed to providers for optimal use of resources. To this end, the broker determines a period for evaluation and gets the shared resources of the providers including some virtual machines at the beginning of each period. In addition, the broker gets the requests from the users during the evaluation period and distributes them between the members of the federation. Inspired by the concepts of macroeconomics, the broker evaluates the requests of each federation member. To this end, the broker has three separate sectors of managing resource-request, evaluation, and pricing as follows.

  1. 1.

    Resource-request management (RRM): This part of the broker is responsible for making the relation between the broker and federation members. In addition, it gets and classifies the user’s requests and distributes them between the members of the federation to supply the best profit for the federation. In addition, it determines the evaluation for that time period.

  2. 2.

    Evaluation: The evaluation of service providers is done in this part of the broker. According to economic evaluations, the number of requests registered by the request management section is sent to the evaluation section. Inspired by macroeconomic concepts, it calculates the demand-income function for service providers, separately, and finds the relation between the resource and income balance in members of the federation. Then, it calculates the money demand for the provider and calculates the equilibrium point of the federation members at the end of the period and stores the calculated values in its database.

  3. 3.

    Pricing: This section proposes the new price to the members of the federation based on a previous period where the members manage the shared virtual machines based on the proposed price.

5.1.4 User

The user sends the request which includes a set of virtual machines to the broker (Table 1).

Table 1 Related studies on classified approaches

5.2 System model

In this section, the criteria and the performance indicators presented in the proposed method are presented in Table 2. For pricing purposes, first, we determine the evaluation time period. Then, request the number, cost, and price of the virtual machine from the members of the federation and gets the requests of the users, distribute them between members of federation using linear programming and present the evaluation of federation members based on the economic concepts. Finally, we present the proposed price for optimal use of resources to federation members.

Table 2 Criteria and symbols

The resource-request management section gets the requests from the users and data of VMs from members of the federation. The requests data includes a vector that stores a number of virtual machines of the users in a vector and distributes it between members of the federation for implementation. To this end, the broker utilizes a linear programming model to distribute the requests between members of the federation and adjust the requests in such a way as to maximize the profit of the federation:

$$\begin{gathered} MAX\mathop \sum \limits_{{J = 1}}^{n} I_{{alc}}^{j} vs*\left( {PR_{s}^{j} - ~CP_{c}^{j} vs} \right) + I_{{alc}}^{j} vm*\left( {PR_{m}^{j} - ~CP_{c}^{j} vm} \right) + ~I_{{alc}}^{j} vl*\left( {PR_{l}^{j} - ~CP_{c}^{j} vl} \right) + ~I_{{alc}}^{j} vx*\left( {PR_{x}^{j} - ~CP_{c}^{j} vx} \right)~ \hfill \\ + I_{{alc}}^{j} gs*\left( {PR_{{gs}}^{j} - ~CP_{c}^{j} gs} \right) + ~I_{{alc}}^{j} gm*\left( {PR_{{gm}}^{j} - ~CP_{c}^{j} gm} \right) + ~I_{{alc}}^{j} gl*\left( {PR_{{gl}}^{j} - ~CP_{c}^{j} gl} \right) \hfill \\ \mathop \sum \limits_{{j = 1}}^{f} I_{{alc}}^{j} vs \le ~\mathop \sum \limits_{{i = 1}}^{n} RQ_{i}^{s} N,\;I_{{alc}}^{j} vs < ~RQ_{i}^{s} N\;for~all~j~~0 < j\left\langle {f~and~~i} \right\rangle \;0 \hfill \\ \mathop \sum \limits_{{j = 1}}^{f} I_{{alc}}^{j} vm \le ~\mathop \sum \limits_{{i = 1}}^{n} RQ_{i}^{m} N,\;I_{{alc}}^{j} vm < ~RQ_{i}^{m} N\;for~all~j~~0 < j\left\langle {f~and~~i} \right\rangle \;0 \hfill \\ \mathop \sum \limits_{{j = 1}}^{f} I_{{alc}}^{j} vl \le ~\mathop \sum \limits_{{i = 1}}^{n} RQ_{i}^{l} N,\;I_{{alc}}^{j} vl < ~RQ_{i}^{l} N\;for~all~j~~0 < j\left\langle {f~and~~i} \right\rangle \;0 \hfill \\ \mathop \sum \limits_{{j = 1}}^{f} I_{{alc}}^{j} vx = \mathop \sum \limits_{{i = 1}}^{n} RQ_{i}^{x} N,\;I_{{alc}}^{j} vx < ~RQ_{i}^{x} N\;for~all~j~~0 < j\left\langle {f~and~~i} \right\rangle \;0 \hfill \\ \mathop \sum \limits_{{j = 1}}^{f} I_{{alc}}^{j} gs = \mathop \sum \limits_{{i = 1}}^{n} RQ_{i}^{{gs}} N,\;I_{{alc}}^{j} gs < ~RQ_{i}^{{gs}} N\;for~all~j~~0 < j\left\langle {f~and~~i} \right\rangle \;0 \hfill \\ \mathop \sum \limits_{{j = 1}}^{f} I_{{alc}}^{j} gm = \mathop \sum \limits_{{i = 1}}^{n} RQ_{i}^{{gm}} N,\;I_{{alc}}^{j} gm < ~RQ_{i}^{{gm}} N\;for~all~j~~0 < j\left\langle {f~and~~i} \right\rangle \;0 \hfill \\ \mathop \sum \limits_{{j = 1}}^{f} I_{{alc}}^{j} gl = \mathop \sum \limits_{{i = 1}}^{n} RQ_{i}^{{gl}} N,\;I_{{alc}}^{j} gl < ~RQ_{i}^{{gl}} N\;for~all~j~~0 < j\left\langle {f~and~~i} \right\rangle \;0 \hfill \\ I_{{alc}}^{j} gs > 0~,~I_{{alc}}^{j} gm > 0~,~I_{{alc}}^{j} gl > 0 \hfill \\ I_{{alc}}^{j} vs > 0~,~I_{{alc}}^{j} vm > 0~,~I_{{alc}}^{j} vl > 0,~I_{{alc}}^{j} vx > 0. \hfill \\ \end{gathered}$$
(8)

5.2.1 Demand-income

Demand-income is equivalent to demand function in macroeconomics. As in the macroeconomics, demand-income function is constituted from two sections of demand and income and different parts of demand generate income, we have considered CSP investment and broker’s consumption demand from different parts of demand and considered it as equivalent to virtual machines prepared by CSP and broker’s request, i.e., we have considered the demand section in demand-income function as equivalent to investment that is the number of prepared (invested) virtual machines and showed it as provision. Moreover, we show investment consumption with \(BRK\) and consider it as equivalent to the requests sent by the broker to CSP, i.e., as Eq. 1, the investment is converted by broker’s request to income for CSP.

In this section, we will model the cloud service providers inspiring from the demand-income economic model. The providers provide the cloud services like virtual machines o the users. Thus, the cloud provider provision includes the preparation of some virtual machines of different types that is equal to the investment in the economy. On the other hand, selling goods and services creates income. Therefore, we could write the relation between provision and allocation as follow:

$$Allocation = \Pr ovision + BRK.$$
(9)

Allocation is the profit of virtual machine which is allocated to the user, and the provision is the potential profit of virtual machines that the provider could allocate to the user.

In other words, provision is the profit earned from sum of virtual machines prepared for a period and is equivalent to investment in one period, i.e., we can consider provision as equal to \(I\) in equation number 1 and BRK is the broker’s request that converts the investment to income. Other parts of demand such as export, import, and other demands are ignored as in our proposed model, sending the virtual machine from one CSP to other CSP is ignored. In our view, only the virtual machines are the investment goods that create income by allocation to user, and we have shown the income with allocation. In follows, we have calculated the money equivalent to provision and allocation in Eqs. 10 and 11.

Therefore, we calculate the income (or allocation) earned from the allocation of the virtual machines according to price and cost in a request through Eq. 10.

$$\begin{gathered} ALC_{i}^{j} = RQ_{i}^{s} N*\left( {PR_{s}^{j} - CP_{c}^{j} vs} \right) + RQ_{i}^{m} N*\left( {PR_{m}^{j} - CP_{c}^{j} vm} \right) \hfill \\ + RQ_{i}^{l} N*\left( {PR_{l}^{j} - CP_{c}^{j} vl} \right) + RQ_{i}^{x} N*\left( {PR_{x}^{j} - CP_{c}^{j} vx} \right) \hfill \\ + RQ_{i}^{gs} N*\left( {PR_{gs}^{j} - CP_{c}^{j} gs} \right) + RQ_{i}^{gm} N*\left( {PR_{gm}^{j} - CP_{c}^{j} gm} \right) \hfill \\ + RQ_{i}^{gl} N*\left( {PR_{gl}^{j} - CP_{c}^{j} gl} \right) . \hfill \\ \end{gathered}$$
(10)

As previously stated, the investment (or Provision) is the profit earned from producing different types of a virtual machines that could be provided by the service provider. As far as the service provider shares some virtual machines in a cloud federation, the investment of a provider will be calculated as per Eq. 11. Therefore, the investment profit in a period is equal to the profit earned from the whole virtual machine.

$$\begin{gathered} PRV_{j} = I_{res}^{j} vs*\left( {PR_{s}^{j} - CP_{c}^{j} vs} \right) + I_{res}^{j} vm*\left( {PR_{m}^{j} - CP_{c}^{j} vm} \right) \hfill \\ + I_{res}^{j} vl*\left( {PR_{l}^{j} - CP_{c}^{j} vl} \right) + I_{res}^{j} vx*\left( {PR_{x}^{j} - CP_{c}^{j} vx} \right) \hfill \\ + I_{res}^{j} gs*\left( {PR_{gs}^{j} - CP_{c}^{j} gs} \right) + I_{res}^{j} gm*\left( {PR_{gm}^{j} - CP_{c}^{j} gm} \right) \hfill \\ + I_{res}^{j} gl*\left( {PR_{gl}^{j} - CP_{c}^{j} gl} \right). \hfill \\ \end{gathered}$$
(11)

At the beginning of the period, VMs are declared to the broker through service provider and the investment is determined at the beginning of the period. Each period consists of several requests. In other words, the allocation and provision balance are calculated after each request, and this continues until the end of the period. After each request, the balance of provision will be prepared for the next request, and this process continues to the end of the evaluation period.

At the end of each request, Eq. 12 is established between allocation and provision:

$$ALC_{i}^{j} = \user2{ }PRV_{j} - {\upalpha }*ALCR_{i}^{j} .$$
(12)

α is a constant value determined in proportion to the investment value, based on which the coefficient-income is determined. Usually, α is considered such that \(ALCR_{i}^{j}\) becomes lower value after each allocation. Therefore, the product of α multiplied by coefficient-income is equal to the investment balance after request. In other words, using the provision balance, we determine a coefficient-income after each request and α constant. As far as allocation has an inverse relation with provision balance, the relation between allocation and coefficient-income is also inverse which is determined using linear regression for a period, which is shown in Fig. 3.

Fig. 3
figure 3

Relationship between allocation and Coefficient-Income in demand-income

5.2.2 Money demand

Money demand for a service provider is equal to the ratio of provision profit to the average profit. The average profit calculates the profit of virtual machines; therefore, the money demand is the ratio of the expected profit from the provision to the profit of virtual machines units which is calculated through investment and average profit. As far as the money demand is defined as the ratio of profit earned from the provision to an average profit of virtual machine, the money demand is expected to be several times higher than the allocation. Therefore, after each request, we calculate the money demand expected by the service provider.

$$\left( {PRV_{j} } \right)/\left( {MN_{J} } \right) = K\left( {ALC_{i}^{j} } \right)$$
(13)
$$MN_{J} = {{\left( \begin{gathered} \left( {PR_{s}^{j} - ~CP_{c}^{j} vs} \right) + ~\left( {PR_{m}^{j} - ~CP_{c}^{j} vm} \right) \hfill \\ + ~\left( {PR_{l}^{j} - ~CP_{c}^{j} vl} \right) + ~\left( {PR_{x}^{j} - ~CP_{c}^{j} vx} \right) + \left( {PR_{{gs}}^{j} - ~CP_{c}^{j} gs} \right) \hfill \\ + ~\left( {PR_{{gm}}^{j} - ~CP_{c}^{j} gm} \right) + ~\left( {PR_{{gl}}^{j} - ~CP_{c}^{j} gl} \right) \hfill \\ \end{gathered} \right)} \mathord{\left/ {\vphantom {{\left( \begin{gathered} \left( {PR_{s}^{j} - ~CP_{c}^{j} vs} \right) + ~\left( {PR_{m}^{j} - ~CP_{c}^{j} vm} \right) \hfill \\ + ~\left( {PR_{l}^{j} - ~CP_{c}^{j} vl} \right) + ~\left( {PR_{x}^{j} - ~CP_{c}^{j} vx} \right) + \left( {PR_{{gs}}^{j} - ~CP_{c}^{j} gs} \right) \hfill \\ + ~\left( {PR_{{gm}}^{j} - ~CP_{c}^{j} gm} \right) + ~\left( {PR_{{gl}}^{j} - ~CP_{c}^{j} gl} \right) \hfill \\ \end{gathered} \right)} 7}} \right. \kern-\nulldelimiterspace} 7}.$$
(14)

In this part, the provision and profit are calculated from Eqs. 11 and 10. The expected profit and average profit are fixed before request; however, the allocation depends on the request. Therefore, Eq. 9 is adjusted using provision balance, where the provision balance has a direct relation with the income as shown in Eq. 15.

$$\frac{{PRV_{j} }}{{MN_{J} }} = k\left( {ALC_{i}^{j} } \right) - {\upbeta }*ALCR_{i}^{j} .$$
(15)

We have expressed provision balance after request in this equation with Beta constant value and coefficient-income. At the end of the period, the broker obtains the relation between allocation and coefficient-income using linear regression. We show the relation between coefficient-income and income in Fig. 4 where the relation between allocation and coefficient-income is direct.

Fig. 4
figure 4

Relationship between allocation and coefficient-income in money demand

5.2.3 Equilibrium

The broker determines equilibrium for the provider at the end of the period. To this end, he first calculates the relation between income and coefficient-income from the demand-income section. Then, the broker utilizes the data of money demand section and calculates the direct relationship between income and coefficient-income. In this section, the broker uses the information from demand-income and the money demand and calculates the coefficient-equilibrium and equilibrium income. The relation between coefficient-income and equilibrium income is shown in Fig. 5.

Fig. 5
figure 5

Equilibrium coefficient-income

5.2.4 Pricing

So far, we explained a method for the evaluation of a federation member based on the economic concepts. In addition, we calculated the equilibrium of each federation member where the service provider is at the best status, i.e., the best income for a service provider is earned at the equilibrium point that is proportionate to the requests in that period. On the other hand, the requests are distributed between members of the federation based on the cost and price of the virtual machine. The lower number of requests for a member is because of the higher price of its virtual machine compared to other members of the federation which make it less competitive. Therefore, in this section, we present a method based on the evaluation of the proposed resources and competitive price to the cloud service providers.

For evaluation purposes, the main period should be defined which includes a number of users’ requests. For example, a period can include N requests, each containing some virtual machines. The providers also reserve some virtual machines at the beginning of the period to respond to the requests. The requests will be distributed between the federation members and based on federation profit maximization; then, after each request for the reserved resources, CSPs will be updated. At the end of the period, the coefficient-income for demand-income and money demand will be calculated according to Sect. 4.2.1 and 4.2.2, and the coefficient-equilibrium of CSPs will be obtained. If the equilibrium coefficient is positive, it means that the number of reserved resources is higher than requests; otherwise, if it is negative, it means that the number of reserved resources is lower than requests of the period. Therefore, the equilibrium coefficient presents a criterion for the number of shared resources of CSPs.

In order for the reserved resources to be optimal and CSPs not to reserve additional resources, it is necessary to reevaluate the main evaluation period, which is called a secondary period. To this end, first, we perform the resource balancing based on the equilibrium coefficient of the main period, i.e., if the positive equilibrium coefficient is C percent, we deduce C percent of the shared resources of the main period; however, we consider the shared resources fixed during the secondary period and reevaluate the CSPs with the requests of the main period, and obtain the equilibrium coefficient of secondary period and continue this process until achieving the desired equilibrium coefficient.

The difference between the main and secondary evaluation process is that in the main process, the CSP shared resources should be updated after each request; however, in the secondary process, first, the shared resources are balanced, while its value is fixed before the request, i.e., CSP compensates the resource deficiency after request.

Concerning the above assumptions, we might have several secondary evaluations and its amount depends on the intended equilibrium coefficient, i.e., if we intend to reserve at most 10% of resources for the requests’ fluctuations, then we continue the secondary periods up to the equilibrium coefficient of less than 10%.

Then, at the end of the main and secondary evaluations, we compare the equilibrium coefficient of CSPs. The CSP with the least equilibrium-coefficient and the most appropriate price is considered as a criterion for pricing. Therefore, the CSP’s price is achieved based on the least equilibrium coefficient according to Eq. 16.

$$SPRC_{t + 1}^{j} = \left( {EQL_{t}^{j} - EQL_{t}^{j} min} \right).$$
(16)

Therefore, in order to create appropriate price for a CSP with high equilibrium-coefficient, its price shall be decreased; on the other hand, since the price is constant, CSP cost should be decreased up to\(SPRC_{t + 1}^{j}\), so that more virtual machines can be sold. The other solution is to reduce the prepared resources proportionate to the main and final period. In other words, the difference between the resources provided in the main period compared to final period is considered as resource surplus; by its reduction, it is possible to increase CSP income and make optimal use of CSP resources.

5.3 Proposed algorithm

In this section, the proposed algorithm is explained based on the economic evaluation method. The algorithm is constituted of three phases. The first phase is the manage resource request phase, where the broker gets the information of service providers and users and determines a period for evaluation. In addition, the broker distributes the requests between members of the federation. The second phase of the algorithm is the evaluation phase, where the broker evaluates the federation members based on economic concepts and determines the income-equilibrium coefficient for the federation members. The third phase is pricing which determines the optimal resources for CSPs and proposes the optimal price to CSPs.

figure a

5.3.1 Manage request-resource phase

In the manage request-resource phase, the algorithm gets some virtual machines from the service providers including the number and type of virtual machines, and defines an evaluation phase where each period is constituted from a number of requests. In addition, the request sending process will be performed based on cost and price.

figure b

5.3.2 Evaluation phase

The evaluation phase uses a set of requests that are distributed by the manage request-resource phase for evaluation. To this end, it calculates the profit of the presented virtual machine for the service providers through cost and price of manage request-resource phase which is equal to investment for each provider at the beginning of the period. Then, it calculates demand-income and money demand for providers based on the requests and stores the coefficient-income. After calculating the coefficient-incomes, it calculates the linear regression algorithm between coefficient-income and incomes in demand-income function and calculates and stores the slope. Moreover, it implements the linear regression between coefficient-income and income for money demand and calculates the slope. Then, it calculates the algorithm of the two lines equation for each provider using linear regression and calculates and stores an equilibrium coefficient-income and equilibrium provision for each provider using the intersection of two lines.

figure c

5.3.3 Pricing phase

The pricing phase utilizes the results of the evaluation phase at the end of the period. Then, it presents the proposed service price and resources to the service providers in the cloud federation. To this end, the pricing phase gets the equilibrium income-coefficient related to the main phase of CSPs from the evaluation phase. If the equilibrium income-coefficient is above 10%, then the CSP will be reevaluated and this process continues until reaching the equilibrium income-coefficient less than 10%.

figure d

5.4 Experimental setup

In this paper, it is assumed that the cloud federation configuration includes the number of virtual machines, cost, and price of the virtual machines. In addition, the price of a virtual machines is presented in Table 3 and its cost in Table 4, where the price of different types of virtual machines for four service providers is assumed as equal; however, the cost of CSPs virtual machines is different. Therefore, the profit earned from selling virtual machines is the difference between the price and cost; and CSPs earn different profits from selling the same number of one type of virtual machines. The number of virtual machine is also presented in Table 5 which includes CSP, type of virtual machine, and its number. Moreover, the request of vector virtual machines includes seven types of virtual machines that are presented to the federation. The number of the requested virtual machines is a random number between zero and 10.

Table 3 Price of virtual machine
Table 4 Cost of virtual machine
Table 5 Number of virtual machine

5.5 Experimental results

In this section, the details of the results are presented and analyzed, and the performance of the proposed method is explained. This test will be conducted to evaluate the benefits of the proposed method with a number of service providers provided by the CFFM [19] and AgCA [26] methods.

For this purpose, we considered four CSPs for experiment number one, which are the best among several providers and are members of an optimal federation determined by the Cloud Federation Formation Method (CFFM). CFFM selects the best CSPs for shaping the federation and distribute the requests between members of federation. Here, first we have divided the requests between members of federation that are determined based on CFFM method and iterated them for a period including 20 requests. Then, we have calculated the CSP allocation and provision of each request. Profit includes allocations made by a CSP and received the equivalent money, and provision is equivalent to investment. We then calculated the resource surplus for each CSP using the proposed method and continued it to achieve the optimal source for each CSP using the proposed method. In the following, we have compared allocation and provision for each request in CFFM and the proposed methods for the entire period.

In the second experiment, we implemented the proposed method on the cloud federation of the AgCA method. This method evaluates the CSP’s based on the trust criterion in which trust is measured based on the CAIQ standard method. The CAIQ is provided by cloud providers to describe their security capabilities to customers. Requests are distributed among members through Home CSP based on trust criteria in this method.

5.5.1 Experiment 1

Figure 6 shows the relation between allocation and provision for CSP 1 in the proposed CFFM federation, and Fig. 7 shows the relevance between profit and expected profit for CSP 1 after implementation of the proposed method, and Fig. 8 shows the comparison between the expected profits in two way, where provision and allocation are displayed separately for CPU and GPU. Also, provision and allocation is equivalent to the dollar value of the stored resources, which is the same as the actual benefit and expected profit and is called profit for short.

Fig. 6
figure 6

Provision and allocation for CSP1 in CFFM federation

Fig. 7
figure 7

Provision and allocation for CSP1 in proposed algorithm

Fig. 8
figure 8

Comparison of the PROVISION between CFFM and proposed method for CSP1

In following, Figs. 9, 10 and 11 are drawn for comparison between allocation and provision of CSP 2 in three status.

Fig. 9
figure 9

Provision and allocation for CSP2 in CFFM federation

Fig. 10
figure 10

Provision and allocation for CSP2 in proposed algorithm

Fig. 11
figure 11

Comparison of the PROVISION between CFFM and proposed method for CSP2

For CSP 3, the diagrams comparing the allocation and provision are drawn in Figs. 12, 13 and 14.

Fig. 12
figure 12

Provision and allocation for CSP3 in CFFM federation

Fig. 13
figure 13

Provision and allocation for CSP3 in proposed algorithm

Fig. 14
figure 14

Comparison of the PROVISION between CFFM and proposed method for CSP3

In what follows, the valuation processes for CSP 4 are investigated in Figs. 15, 16, and 17.

Fig. 15
figure 15

Provision and allocation for CSP4 in CFFM federation

Fig. 16
figure 16

Provision and allocation for CSP4 in CFFM federation and proposed algorithm

Fig. 17
figure 17

Comparison of the PROVISION between CFFM and proposed method for CSP4

After investigating the use of resources over a period, we show the allocation and provision of CSPs in the CFFM optimal federation through the diagram in Fig. 18 for one period. In addition, we show the comparison between allocation and provision for the proposed method using Fig. 19 at the end of the evaluation period. At the end, a comparison is made between the provision in the CFFM federation and the proposed method in Fig. 20.

Fig. 18
figure 18

Comparison between profit and expected profit in CFFM method

Fig. 19
figure 19

Comparison between profit and expected profit in proposed method

Fig. 20
figure 20

Comparison between expected profit in proposed method and CFFM

Therefore, concerning the reserved resources before the evaluation, the surplus resources for four CSPs are shown in Fig. 21 that can achieve higher profit in the federation by balancing the CSP resources.

Fig. 21
figure 21

Excess resources of CSPs at the end of the evaluation

5.5.2 Experiment 2

In this part, first, the CSP trust criterion is calculated based on security parameters and SLA, and the chain of CSPs to respond to requests is determined. Since security and SLA criteria are not our concern, we have distributed the requests among the proposed federations based on the desired maximum benefit, where the optimal federation is determined based on the AgCA evaluation.

Figure 22 shows the relation between allocation and provision for four CSP in the AgCA federation, and Fig. 23 shows the relation between profit and expected profit for four CSP after implementation of the proposed method, and Fig. 24 shows the comparison between the expected profits in two methods, where provision and allocation are displayed separately for CPU and GPU. Also, provision and allocation is equivalent to the dollar value of the stored resources, which is the same as the actual profit and the expected profit, and is called profit for short.

Fig. 22
figure 22

Provision and allocation for four CSPs in AgCA federation

Fig. 23
figure 23

Provision and allocation for four CSPs in AgCA federation and proposed algorithm

Fig. 24
figure 24

Comparison of the PROVISION between AgCA and proposed method for four CSPs

5.6 Discussion

As far as the participants and the service cloud providers are diverse and might have various shared resources, the proposed mechanism periodically evaluates the CSPs based on resource evaluation, and then performs the balancing of shared resources at the end of the main period and continues this process in the secondary periods for CSPs until reaching the final equilibrium income coefficient. Finally, it presents the optimal proposed price to CSPs. Therefore, the presented method performs the CSPs evaluations and proposes the best-shared resources and price to them. In addition, the proposed method provides CSP a criterion for resource preparation to avoid the reserve of extra resources and predict the future requests trend.

Here, we have used the resource reduction approach for optimal use. In so far as the price of virtual machines is fixed, cost reduction is almost impossible due to being dependent on the external factors such as wage, energy price, and infrastructure so that the approach of reducing the resources provided has been used for the optimal use of resources.

6 Conclusion and future works

Cloud federation is an environment that promotes the quality of cloud services through sharing resources. Provisioning efficient services require optimal use of resources which is the main challenge of cloud federation. Due to the effect of cost, price, and amount of optimal shared resources, in the present study, we presented a three-stage process for provisioning the optimal resources and price for optimal use of shared resources of CSPs. We get customers data in the “manage resource-request phase” from the users and CSPs. In the “evaluation” phase, the requests are distributed between the members of the federation based on price and cost using optimization technique, and the evaluation of service providers is done based on the macroeconomic method and linear regression and optimization techniques. In the “pricing” phase, the evaluation results of the main period of the evaluation phase are taken and in case of necessity, the secondary periods will be adjusted for the reevaluation of CSPs, and the price proposal will be presented at the end of pricing to CSPs. The result of tests shows that this method predicts the status of resource consumption in the future proportionate to the current status of CSPs and presents the competitive price to them. For future works, it is recommended to utilize this method for the distribution of requests between federation members. Moreover, it is possible to use the proposed method with the Markov chain for the prediction of resource usage in the future. In addition, it is possible to optimize the migration of service between federation members using the proposed method.