We have API Gateway 4.17.09, installed on private cloud with CentOS 7.4.
We have a requirement to support data-as-a-service.
Essentially, we need to be able to limit the amount of data being pulled out of backend server per day.
Is there is a way to do it, in API Gateway?
Solved! Go to Solution.
Yes, you could do it.
You would need to employ a quota policy.
<Quota name="Quota-OnRequest" type="calendar"> <StartTime>2018-03-20 00:00:00</StartTime> <Interval>1</Interval> <TimeUnit>day</TimeUnit> <Allow count="10737418240"/> <Synchronous>false</Synchronous> <Distributed>true</Distributed> <Identifier>My-Data-As-A-Service</Identifier> </Quota>
<Quota name="Quota-OnResponse" continueOnError='true' type="calendar"> <StartTime>2018-03-20 00:00:00</StartTime> <Interval>1</Interval> <TimeUnit>day</TimeUnit> <Allow count="10737418240"/> <Synchronous>false</Synchronous> <Distributed>true</Distributed> <Identifier>My-Data-As-A-Service</Identifier> <MessageWeight ref="size_in_bytes_of_response"/> </Quota>
You could combine this with caching to reduce the load on the data-as-a-service, too.
Yes, you could do it.
You would need to employ a quota policy.
<Quota name="Quota-OnRequest" type="calendar"> <StartTime>2018-03-20 00:00:00</StartTime> <Interval>1</Interval> <TimeUnit>day</TimeUnit> <Allow count="10737418240"/> <Synchronous>false</Synchronous> <Distributed>true</Distributed> <Identifier>My-Data-As-A-Service</Identifier> </Quota>
<Quota name="Quota-OnResponse" continueOnError='true' type="calendar"> <StartTime>2018-03-20 00:00:00</StartTime> <Interval>1</Interval> <TimeUnit>day</TimeUnit> <Allow count="10737418240"/> <Synchronous>false</Synchronous> <Distributed>true</Distributed> <Identifier>My-Data-As-A-Service</Identifier> <MessageWeight ref="size_in_bytes_of_response"/> </Quota>
You could combine this with caching to reduce the load on the data-as-a-service, too.
<MessageWeightref="size_in_bytes_of_response"/> The purpose of this statement is not clear. Moreover from where will be the value of size_in_bytes_of_response be fetched?
Hi, if you have a new question, ask a new question. Don't post new questions as comments to answers for old questions.
This code actually counts the no of hits not the amount of the data being pulled from server
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 |