I deployed Distributed WSO2 APIM (2.6.0 - Pattern 2) IS as KM setup in Kubernetes. In my setup there are multiple replicas in the API Gateway deployment.
If the token is generated through the replica 1 of API gateway , the replica 2 takes a significant time to sync with the replica 1 and get to know that a token is generated by replica 1.
So If I send a request to the replica 2 with the token generated in replica 1, it will show that the token doesn't exist. But after few minutes If I do the same and send the same request to replica 2 it will work without issue because replica 2 is synced with replica 1 at that time and know that the token is generated by replica 1.
Related
We are trying to publish data form db2-IIDR (IBM CDC) to Kafka on AWS . Subscription fails due to below error-
An error occurred during the conversation with Kafka.
Error: org.apache.kafka.common.errors.TimeoutException: Batch containing 1 record(s) expired due to timeout while requesting metadata from brokers for cdckafka-subsname-commitstream-0
Are there any pre-requisites to be performed to publish the streams from IIDR to Kafka on aws ?
Some more details -
-Kafka cluster is running on AWS
-IIDR CDC engines --> on premise (both source and target)
-On premise IPs have been white-listed and I can ping/telnet ports from on-prem to aws and vice versa .
Thanks!
You need to set up your Kafka brokers with listeners that will work with external clients. You can see details here.
Simply pinging from client on-premises to AWS is not enough - you need to validate it with a Kafka client such as kafkacat
I am getting below error when I'm doing git operations on a Code Commit repository. The number of operations is in the range of tens in few minutes - adding/removing/pulling files.
Is this because of AWS throttling or something else?
If so, what's the limit and how do I increase it in AWS?
"interim_desc": "RequestId: 12e27770db854bf0a6034cd6f851717d. 'git fetch origin --depth 20' returned with exit code 128.
error: RPC failed; HTTP 429 curl 22 The requested URL returned error: 429 Too Many Requests: The remote end hung up unexpectedly'"
Here is the manual how to handle 429 error while accessing CodeCommit:
Access error: “Rate Exceeded” or “429” message when connecting to a CodeCommit repository
https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-ae.html#troubleshooting-ae3
I would copy here the most noteable part:
Implement jitter in requests, particularly in periodic polling requests.
If you have an application that is polling CodeCommit periodically and this application is running on multiple Amazon EC2 instances, introduce jitter (a random amount of delay) so that different Amazon EC2 instances do not poll at the same second. We recommend a random number from 0 to 59 seconds to evenly distribute polling mechanisms across a one-minute timeframe.
......
Request a CodeCommit service quota increase in the AWS Support Center.
To receive a service limit increase, you must confirm that you have already followed the suggestions offered here, including implementation of error retries or exponential backoff methods. In your request, you must also provide the AWS Region, AWS account, and timeframe affected by the throttling issues.
I need to load test a node js based AWS lambda function behind AWS API Gateway. But If I try basic test with 1000 users + 60 seconds, 10-20 % requests get failed with error
java.net.SocketException: Broken pipe (Write failed)
When I try same node js function on local server with node js / mongo db, It allow 5K..10K requests without failures.
Node js script inserting a big packet json data (approx 100K) into mongo db.
These are configurations
Jmeter : connect timeout : 10000 millseconds
AWS Lamdba RAM allocated : 512M
AWS Lamdba Timeout : 30 seconds
UPDATE :
After updating heap to 2GB, I am able to hit 1K requests, but now it failing (40% requests) at 5K requests.
We are using wso2am-1.10.0 with a gateway cluster. The throttling tier limits are not behaving as expected.
We have redefined the “Bronze” tier to allow 3 requests in 1 minute. The application is set to “Large”, the subscription to the API is set to “Bronze” and the resource is set to “Unlimited” . We understand that “Bronze” is the most restrictive tier in this case.
We have tested the API with and without a load-balancer:
With load-balancer:
We are always allowed to exceed the 3 requests by minute and then the throttling behaviour became inconsistent. Although it does not seem to be a multiple of the number of gateway workers.
Without load-balancer:
We call our API directly through a gateway worker of our cluster, the worker allows 4 requests(app-tier limit + 1) before returning a quota failure. Then if we call this API, within the same minute, but through an other gateway worker of our cluster, this worker allows one request before failing because of the quota limit.
We have tested the API without clustering the gateways and it works as expected.
Any ideas?
Thanks in advance!
Do I get charged for publishing a message to an endpoint, even though this one is saved as not enabled on AWS SNS. Do I need to do a clean up job on my side to make sure that all the endpoints linked to a user are always up to date?
Thanks.
So you're charged for each authenticated API Request, ontop of additional pricing per Notification etc.
It's currently charged at $0.50 per 1 million API Requests, regardless if it returns a HTTP 200 or not.
First 1 million Amazon SNS requests per month are free
$0.50 per 1 million Amazon SNS requests thereafter
Source