From ashish.patel at futuregroup.in Fri Mar 2 09:56:23 2018 From: ashish.patel at futuregroup.in (Ashish Patel) Date: Fri, 2 Mar 2018 14:56:23 +0000 Subject: [Apiman-user] APIManager Prod issue help required In-Reply-To: References: Message-ID: <2cb1a3a5307e47b8863943bbf29b57c0@futuregroup.in> Thanks Eric. Yes, after bit diagnosing found that one of our production API source was down/timing out (we have set timeout in apiman config) as we got just too many hits for same API and this has caused Production APIMan Wildfly server also clogging other requests. Though we resolved problem by solving thhe said Production API source ? was wandering is that any way we can isolate the API response time issue only for the impacted API and not others (like in this case it impacted all API requests including from API Manager). I could think of one option to resolve is to configure low timeouts in apiman config and also specifying API specific timeout to override if required (like for said Production API the timeout was higher due to it?s a Legacy App). Will that be enough ? how can we do it in APIMan ? or any other suggestions ? Thanks & Regards, Ashish Patel (M) +91 93270 15128 From: Eric Wittmann [mailto:eric.wittmann at redhat.com] Sent: Thursday, March 01, 2018 03:15 To: Ashish Patel Cc: apiman-user at lists.jboss.org Subject: Re: [Apiman-user] APIManager Prod issue help required What's happening when you ask the API Manager for the endpoint is that the manager tries to make an HTTP connection to the Gateway that the API has been published to. The assumption is that the Gateway knows its own external URL and is therefore the only party that can report it. The error stack trace indicates that the HTTP connection between the manager and gateway resulted in a 502 error (Bad Gateway). Has anything changed with your deployed Gateway? Can you still publish APIs to that Gateway? You could try going to the Gateway admin page and try "testing" the Gateway link from there. -Eric On Wed, Feb 28, 2018 at 2:22 AM, Ashish Patel > wrote: Hi, Issue help required: We are using APIMan 1.2.7 in production with Wildfly 10. In APIManager UI, I can see all API details, however whenever I click on Endpoin, I get below error. Even when I click on APIManager -> ClientApp -> click on APIs, it breaks with 500 page error. Any help on this is highly appreciated. io.apiman.manager.api.rest.contract.exceptions.SystemErrorException: java.lang.RuntimeException: Failed to get the API endpoint: 502 at io.apiman.manager.api.rest.impl.OrganizationResourceImpl.getApiVersionEndpointInfo(OrganizationResourceImpl.java:1937) at io.apiman.manager.api.rest.impl.OrganizationResourceImpl$Proxy$_$$_WeldClientProxy.getApiVersionEndpointInfo(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvok ?. Caused by: java.lang.RuntimeException: Failed to get the API endpoint: 502 at io.apiman.manager.api.gateway.rest.GatewayClient.getApiEndpoint(GatewayClient.java:120) at io.apiman.manager.api.gateway.rest.RestGatewayLink.getApiEndpoint(RestGatewayLink.java:156) Thanks & Regards, Ashish Patel _______________________________________________ Apiman-user mailing list Apiman-user at lists.jboss.org https://lists.jboss.org/mailman/listinfo/apiman-user -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180302/68f33411/attachment-0001.html From eric.wittmann at redhat.com Fri Mar 2 12:38:28 2018 From: eric.wittmann at redhat.com (Eric Wittmann) Date: Fri, 2 Mar 2018 12:38:28 -0500 Subject: [Apiman-user] APIManager Prod issue help required In-Reply-To: <2cb1a3a5307e47b8863943bbf29b57c0@futuregroup.in> References: <2cb1a3a5307e47b8863943bbf29b57c0@futuregroup.in> Message-ID: I can't remember if there is a way to configure per-API timeouts in the Gateway. @marcsavy any thoughts on that? On Fri, Mar 2, 2018 at 9:56 AM, Ashish Patel wrote: > Thanks Eric. > > > > Yes, after bit diagnosing found that one of our production API source was > down/timing out (we have set timeout in apiman config) as we got just too > many hits for same API and this has caused Production APIMan Wildfly server > also clogging other requests. > > > > Though we resolved problem by solving thhe said Production API source ? > was wandering is that any way we can isolate the API response time issue > only for the impacted API and not others (like in this case it impacted all > API requests including from API Manager). > > > > I could think of one option to resolve is to configure low timeouts in > apiman config and also specifying API specific timeout to override if > required (like for said Production API the timeout was higher due to it?s a > Legacy App). Will that be enough ? how can we do it in APIMan ? or any > other suggestions ? > > > > Thanks & Regards, > > Ashish Patel > > (M) +91 93270 15128 <+91%2093270%2015128> > > > > > > > > *From:* Eric Wittmann [mailto:eric.wittmann at redhat.com] > *Sent:* Thursday, March 01, 2018 03:15 > *To:* Ashish Patel > *Cc:* apiman-user at lists.jboss.org > *Subject:* Re: [Apiman-user] APIManager Prod issue help required > > > > What's happening when you ask the API Manager for the endpoint is that the > manager tries to make an HTTP connection to the Gateway that the API has > been published to. The assumption is that the Gateway knows its own > external URL and is therefore the only party that can report it. > > > > The error stack trace indicates that the HTTP connection between the > manager and gateway resulted in a 502 error (Bad Gateway). > > > > Has anything changed with your deployed Gateway? Can you still publish > APIs to that Gateway? You could try going to the Gateway admin page and > try "testing" the Gateway link from there. > > > > -Eric > > > > > > On Wed, Feb 28, 2018 at 2:22 AM, Ashish Patel > wrote: > > Hi, > > > > Issue help required: We are using APIMan 1.2.7 in production with Wildfly > 10. > > > > In APIManager UI, I can see all API details, however whenever I click on > Endpoin, I get below error. Even when I click on APIManager -> ClientApp -> > click on APIs, it breaks with 500 page error. Any help on this is highly > appreciated. > > > > io.apiman.manager.api.rest.contract.exceptions.SystemErrorException: > java.lang.RuntimeException: Failed to get the API endpoint: 502 > > at io.apiman.manager.api.rest. > impl.OrganizationResourceImpl.getApiVersionEndpointInfo( > OrganizationResourceImpl.java:1937) > > at io.apiman.manager.api.rest. > impl.OrganizationResourceImpl$Proxy$_$$_WeldClientProxy. > getApiVersionEndpointInfo(Unknown Source) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke( > NativeMethodAccessorImpl.java:62) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:498) > > at org.jboss.resteasy.core.MethodInjectorImpl.invoke( > MethodInjectorImpl.java:139) > > at org.jboss.resteasy.core.ResourceMethodInvoker. > invokeOnTarget(ResourceMethodInvoker.java:295) > > at org.jboss.resteasy.core.ResourceMethodInvoker.invoke( > ResourceMethodInvok > > ?. > > > > Caused by: java.lang.RuntimeException: Failed to get the API endpoint: 502 > > at io.apiman.manager.api.gateway.rest.GatewayClient. > getApiEndpoint(GatewayClient.java:120) > > at io.apiman.manager.api.gateway.rest.RestGatewayLink. > getApiEndpoint(RestGatewayLink.java:156) > > > > Thanks & Regards, > > Ashish Patel > > > > > _______________________________________________ > Apiman-user mailing list > Apiman-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/apiman-user > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180302/e9efb6dd/attachment.html From renalexster at gmail.com Wed Mar 7 10:01:08 2018 From: renalexster at gmail.com (Renato Barros) Date: Wed, 7 Mar 2018 12:01:08 -0300 Subject: [Apiman-user] Apiman X-Fowarded-For on Simple Header Policy Message-ID: Hi folks, I'd like to know if there is some way to add the Client remote IP on my Request Header from API Man. I need to *add a Simple Header Policy with a "X-Forwarded-For" containing the client remote ip*. My backend is getting the APIMan IP as remote client, but what I need get to client IP. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180307/10759e31/attachment.html From eric.wittmann at redhat.com Wed Mar 7 13:56:58 2018 From: eric.wittmann at redhat.com (Eric Wittmann) Date: Wed, 7 Mar 2018 13:56:58 -0500 Subject: [Apiman-user] Apiman X-Fowarded-For on Simple Header Policy In-Reply-To: References: Message-ID: I can't remember if there is a policy for this already. If not, it's fairly trivial to write a custom policy. Thoughts Marc? On Wed, Mar 7, 2018 at 10:01 AM, Renato Barros wrote: > Hi folks, > > I'd like to know if there is some way to add the Client remote IP on my > Request Header from API Man. > > I need to *add a Simple Header Policy with a "X-Forwarded-For" containing > the client remote ip*. > > My backend is getting the APIMan IP as remote client, but what I need get > to client IP. > > _______________________________________________ > Apiman-user mailing list > Apiman-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/apiman-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180307/eafab2b7/attachment.html From marc.savy at redhat.com Fri Mar 9 08:07:50 2018 From: marc.savy at redhat.com (Marc Savy) Date: Fri, 9 Mar 2018 13:07:50 +0000 Subject: [Apiman-user] APIManager Prod issue help required In-Reply-To: References: <2cb1a3a5307e47b8863943bbf29b57c0@futuregroup.in> Message-ID: You can set it in the API endpoint properties as: timeouts.read timeouts.connect Regards, Marc On 2 March 2018 at 17:38, Eric Wittmann wrote: > I can't remember if there is a way to configure per-API timeouts in the > Gateway. > > @marcsavy any thoughts on that? > > On Fri, Mar 2, 2018 at 9:56 AM, Ashish Patel > wrote: >> >> Thanks Eric. >> >> >> >> Yes, after bit diagnosing found that one of our production API source was >> down/timing out (we have set timeout in apiman config) as we got just too >> many hits for same API and this has caused Production APIMan Wildfly server >> also clogging other requests. >> >> >> >> Though we resolved problem by solving thhe said Production API source ? >> was wandering is that any way we can isolate the API response time issue >> only for the impacted API and not others (like in this case it impacted all >> API requests including from API Manager). >> >> >> >> I could think of one option to resolve is to configure low timeouts in >> apiman config and also specifying API specific timeout to override if >> required (like for said Production API the timeout was higher due to it?s a >> Legacy App). Will that be enough ? how can we do it in APIMan ? or any other >> suggestions ? >> >> >> >> Thanks & Regards, >> >> Ashish Patel >> >> (M) +91 93270 15128 >> >> >> >> >> >> >> >> From: Eric Wittmann [mailto:eric.wittmann at redhat.com] >> Sent: Thursday, March 01, 2018 03:15 >> To: Ashish Patel >> Cc: apiman-user at lists.jboss.org >> Subject: Re: [Apiman-user] APIManager Prod issue help required >> >> >> >> What's happening when you ask the API Manager for the endpoint is that the >> manager tries to make an HTTP connection to the Gateway that the API has >> been published to. The assumption is that the Gateway knows its own >> external URL and is therefore the only party that can report it. >> >> >> >> The error stack trace indicates that the HTTP connection between the >> manager and gateway resulted in a 502 error (Bad Gateway). >> >> >> >> Has anything changed with your deployed Gateway? Can you still publish >> APIs to that Gateway? You could try going to the Gateway admin page and try >> "testing" the Gateway link from there. >> >> >> >> -Eric >> >> >> >> >> >> On Wed, Feb 28, 2018 at 2:22 AM, Ashish Patel >> wrote: >> >> Hi, >> >> >> >> Issue help required: We are using APIMan 1.2.7 in production with Wildfly >> 10. >> >> >> >> In APIManager UI, I can see all API details, however whenever I click on >> Endpoin, I get below error. Even when I click on APIManager -> ClientApp -> >> click on APIs, it breaks with 500 page error. Any help on this is highly >> appreciated. >> >> >> >> io.apiman.manager.api.rest.contract.exceptions.SystemErrorException: >> java.lang.RuntimeException: Failed to get the API endpoint: 502 >> >> at >> io.apiman.manager.api.rest.impl.OrganizationResourceImpl.getApiVersionEndpointInfo(OrganizationResourceImpl.java:1937) >> >> at >> io.apiman.manager.api.rest.impl.OrganizationResourceImpl$Proxy$_$$_WeldClientProxy.getApiVersionEndpointInfo(Unknown >> Source) >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >> Method) >> >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >> >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> >> at java.lang.reflect.Method.invoke(Method.java:498) >> >> at >> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) >> >> at >> org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) >> >> at >> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvok >> >> ?. >> >> >> >> Caused by: java.lang.RuntimeException: Failed to get the API endpoint: 502 >> >> at >> io.apiman.manager.api.gateway.rest.GatewayClient.getApiEndpoint(GatewayClient.java:120) >> >> at >> io.apiman.manager.api.gateway.rest.RestGatewayLink.getApiEndpoint(RestGatewayLink.java:156) >> >> >> >> Thanks & Regards, >> >> Ashish Patel >> >> >> >> >> _______________________________________________ >> Apiman-user mailing list >> Apiman-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/apiman-user >> >> > > > > _______________________________________________ > Apiman-user mailing list > Apiman-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/apiman-user > From marc.savy at redhat.com Fri Mar 9 08:55:45 2018 From: marc.savy at redhat.com (Marc Savy) Date: Fri, 9 Mar 2018 13:55:45 +0000 Subject: [Apiman-user] Apiman X-Fowarded-For on Simple Header Policy In-Reply-To: References: Message-ID: The simple header policy can't do that directly as I recall. As Eric suggests you should write your own custom policy to achieve this. It should be really simple -- probably just a few lines! On 7 March 2018 at 18:56, Eric Wittmann wrote: > I can't remember if there is a policy for this already. If not, it's fairly > trivial to write a custom policy. Thoughts Marc? > > On Wed, Mar 7, 2018 at 10:01 AM, Renato Barros > wrote: >> >> Hi folks, >> >> I'd like to know if there is some way to add the Client remote IP on my >> Request Header from API Man. >> >> I need to add a Simple Header Policy with a "X-Forwarded-For" containing >> the client remote ip. >> >> My backend is getting the APIMan IP as remote client, but what I need get >> to client IP. >> >> _______________________________________________ >> Apiman-user mailing list >> Apiman-user at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/apiman-user >> > > > _______________________________________________ > Apiman-user mailing list > Apiman-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/apiman-user > From eric.wittmann at redhat.com Fri Mar 9 10:17:11 2018 From: eric.wittmann at redhat.com (Eric Wittmann) Date: Fri, 9 Mar 2018 10:17:11 -0500 Subject: [Apiman-user] Apiman X-Fowarded-For on Simple Header Policy In-Reply-To: References: Message-ID: Note that, with just a little bit of java expertise, you can easily create your own policy plugin. The documentation for doing so is quite good (IMO): http://www.apiman.io/latest/developer-guide.html#_plugins Also there are plenty of examples here: https://github.com/apiman/apiman-plugins You could start with the no-op policy (is a valid, working policy plugin but doesn't do anything) and the simple-header-policy (does things with headers). -Eric On Fri, Mar 9, 2018 at 8:55 AM, Marc Savy wrote: > The simple header policy can't do that directly as I recall. As Eric > suggests you should write your own custom policy to achieve this. It > should be really simple -- probably just a few lines! > > On 7 March 2018 at 18:56, Eric Wittmann wrote: > > I can't remember if there is a policy for this already. If not, it's > fairly > > trivial to write a custom policy. Thoughts Marc? > > > > On Wed, Mar 7, 2018 at 10:01 AM, Renato Barros > > wrote: > >> > >> Hi folks, > >> > >> I'd like to know if there is some way to add the Client remote IP on my > >> Request Header from API Man. > >> > >> I need to add a Simple Header Policy with a "X-Forwarded-For" containing > >> the client remote ip. > >> > >> My backend is getting the APIMan IP as remote client, but what I need > get > >> to client IP. > >> > >> _______________________________________________ > >> Apiman-user mailing list > >> Apiman-user at lists.jboss.org > >> https://lists.jboss.org/mailman/listinfo/apiman-user > >> > > > > > > _______________________________________________ > > Apiman-user mailing list > > Apiman-user at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/apiman-user > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180309/308bdf2d/attachment.html From renalexster at gmail.com Fri Mar 9 11:18:01 2018 From: renalexster at gmail.com (Renato Barros) Date: Fri, 9 Mar 2018 13:18:01 -0300 Subject: [Apiman-user] Apiman X-Fowarded-For on Simple Header Policy In-Reply-To: References: Message-ID: Nice folks. I'll try do it. On Mar 9, 2018 12:17 PM, "Eric Wittmann" wrote: > Note that, with just a little bit of java expertise, you can easily create > your own policy plugin. The documentation for doing so is quite good (IMO): > > http://www.apiman.io/latest/developer-guide.html#_plugins > > Also there are plenty of examples here: > > https://github.com/apiman/apiman-plugins > > You could start with the no-op policy (is a valid, working policy plugin > but doesn't do anything) and the simple-header-policy (does things with > headers). > > -Eric > > > On Fri, Mar 9, 2018 at 8:55 AM, Marc Savy wrote: > >> The simple header policy can't do that directly as I recall. As Eric >> suggests you should write your own custom policy to achieve this. It >> should be really simple -- probably just a few lines! >> >> On 7 March 2018 at 18:56, Eric Wittmann wrote: >> > I can't remember if there is a policy for this already. If not, it's >> fairly >> > trivial to write a custom policy. Thoughts Marc? >> > >> > On Wed, Mar 7, 2018 at 10:01 AM, Renato Barros >> > wrote: >> >> >> >> Hi folks, >> >> >> >> I'd like to know if there is some way to add the Client remote IP on my >> >> Request Header from API Man. >> >> >> >> I need to add a Simple Header Policy with a "X-Forwarded-For" >> containing >> >> the client remote ip. >> >> >> >> My backend is getting the APIMan IP as remote client, but what I need >> get >> >> to client IP. >> >> >> >> _______________________________________________ >> >> Apiman-user mailing list >> >> Apiman-user at lists.jboss.org >> >> https://lists.jboss.org/mailman/listinfo/apiman-user >> >> >> > >> > >> > _______________________________________________ >> > Apiman-user mailing list >> > Apiman-user at lists.jboss.org >> > https://lists.jboss.org/mailman/listinfo/apiman-user >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180309/9020faf5/attachment.html From ashish.patel at futuregroup.in Fri Mar 23 07:17:10 2018 From: ashish.patel at futuregroup.in (Ashish Patel) Date: Fri, 23 Mar 2018 11:17:10 +0000 Subject: [Apiman-user] Transfer Quota Policy Message-ID: Hi, I need small help understanding Transfer Quota policy. Have applied transfer quota policy with below config - attached with one API , set up one client and tested with Rest Client. ?6000 Bytes? of ?upload? data per ?API? per ?Second?. 1. Sent single request which has request payload (upload) > 6000 bytes - Instead of blocking it, it allowed the request and sent the response - However, Apiman is aware of the overshot transfer - can be seen from the Headers. x-transferquota-limit ?6000 x-transferquota-remaining ?-4019 x-transferquota-reset ?0 2. Sent back to back multiple request (same payload as above) and at times it failed with failure code : 10013, "Transfer quota exceeded.". This means it is applying the policy but after some requests , not sure how many. x-policy-failure-code ?10013 x-policy-failure-message ?Transfer quota exceeded. x-policy-failure-type ?Other x-powered-by ?Undertow/1 x-transferquota-limit ?6000 x-transferquota-remaining ?-4019 x-transferquota-reset ?0 Any idea, why it?s not failing in #1 scenario - Ideally it must fail in all requests as payload size is greater than defined. Thanks & Regards, Ashish Patel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180323/59db0cdf/attachment-0001.html From harrytpc at gmail.com Wed Mar 28 13:50:44 2018 From: harrytpc at gmail.com (Harry Trinta) Date: Wed, 28 Mar 2018 14:50:44 -0300 Subject: [Apiman-user] Parameterized host - Api endpoint Message-ID: Hello, I'd like to know if is possible to configure apis endpoints with parameterized hosts, for example: Instead http://service.domain.com/app1, I want to use something like ${host-service}/app1 where host-service=http://service.domain.com and it is registered in a file, for example, apiman.properties. Thanks, Harry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180328/77f5fb84/attachment.html From ashish.patel at futuregroup.in Thu Mar 29 00:46:32 2018 From: ashish.patel at futuregroup.in (Ashish Patel) Date: Thu, 29 Mar 2018 04:46:32 +0000 Subject: [Apiman-user] Transfer Quota Policy Message-ID: <79ae56d94c4242f68dc29354d92d5c79@futuregroup.in> Hi Marc, Sorry for sending direct mail, can you please help release below mail sent to group to all the audience ? Thanks & Regards, Ashish Patel From: Ashish Patel Sent: Friday, March 23, 2018 16:47 To: apiman-user at lists.jboss.org Subject: Transfer Quota Policy Hi, I need small help understanding Transfer Quota policy. Have applied transfer quota policy with below config - attached with one API , set up one client and tested with Rest Client. ?6000 Bytes? of ?upload? data per ?API? per ?Second?. 1. Sent single request which has request payload (upload) > 6000 bytes - Instead of blocking it, it allowed the request and sent the response - However, Apiman is aware of the overshot transfer - can be seen from the Headers. x-transferquota-limit ?6000 x-transferquota-remaining ?-4019 x-transferquota-reset ?0 2. Sent back to back multiple request (same payload as above) and at times it failed with failure code : 10013, "Transfer quota exceeded.". This means it is applying the policy but after some requests , not sure how many. x-policy-failure-code ?10013 x-policy-failure-message ?Transfer quota exceeded. x-policy-failure-type ?Other x-powered-by ?Undertow/1 x-transferquota-limit ?6000 x-transferquota-remaining ?-4019 x-transferquota-reset ?0 Any idea, why it?s not failing in #1 scenario - Ideally it must fail in all requests as payload size is greater than defined. Thanks & Regards, Ashish Patel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180329/651d6df8/attachment.html From jcechace at gmail.com Sat Mar 31 13:18:14 2018 From: jcechace at gmail.com (=?UTF-8?B?SmFrdWIgxIxlY2jDocSNZWs=?=) Date: Sat, 31 Mar 2018 19:18:14 +0200 Subject: [Apiman-user] Transfer Quota Policy In-Reply-To: <79ae56d94c4242f68dc29354d92d5c79@futuregroup.in> References: <79ae56d94c4242f68dc29354d92d5c79@futuregroup.in> Message-ID: Hello Ashish, if I understand correctly you are confused why the request passes the first time while it gets denied the second time? Simply the way this policy works is that it blocks all consecutive requests after the one which went over the quota util reset. Meaning we don't terminate requests in the middle. Worst case this can means that with a limit of 1000 bytes you can do a first request with 999 bytes and still send a second one with 1000 bytes -- next one is guaranteed to be blocked though. Regards, Jakub. On Thu, Mar 29, 2018 at 6:46 AM, Ashish Patel wrote: > Hi Marc, > > > > Sorry for sending direct mail, can you please help release below mail sent > to group to all the audience ? > > > > Thanks & Regards, > > Ashish Patel > > > > > > *From:* Ashish Patel > *Sent:* Friday, March 23, 2018 16:47 > *To:* apiman-user at lists.jboss.org > *Subject:* Transfer Quota Policy > > > > Hi, > > > > I need small help understanding Transfer Quota policy. > > > > Have applied transfer quota policy with below config ? attached with one > API , set up one client and tested with Rest Client. > > > > *?6000 Bytes? of ?upload? data per ?API? per ?Second?.* > > > > 1. Sent single request which has request payload (upload) > 6000 > bytes ? Instead of blocking it, it allowed the request and sent the > response ? However, Apiman is aware of the overshot transfer ? can be seen > from the Headers. > > > > x-transferquota-limit ?6000 > > x-transferquota-remaining ?-4019 > > x-transferquota-reset ?0 > > > > > > 2. Sent back to back multiple request (same payload as above) and > at times it failed with failure code : 10013, "Transfer quota exceeded.". > This means it is applying the policy but after some requests , not sure how > many. > > > > x-policy-failure-code ?10013 > > x-policy-failure-message ?Transfer quota exceeded. > > x-policy-failure-type ?Other > > x-powered-by ?Undertow/1 > > x-transferquota-limit ?6000 > > x-transferquota-remaining ?-4019 > > x-transferquota-reset ?0 > > > > > > Any idea, why it?s not failing in #1 scenario ? Ideally it must fail in > all requests as payload size is greater than defined. > > > > Thanks & Regards, > > Ashish Patel > > > > _______________________________________________ > Apiman-user mailing list > Apiman-user at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/apiman-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180331/dcfcc792/attachment.html