watson-developer-cloud / node-red-node-watson

A collection of nodes for the IBM Watson services
Apache License 2.0
82 stars 86 forks source link

ApiKey basesd rate limit for calls to /token #489

Open rodrigomaraujo opened 3 years ago

rodrigomaraujo commented 3 years ago

Hello guys, I´m using node-red-node-watson for a production service receiving input for a VoiceGateway and WhatsApp API. It´s not a so big service, but we reached 300 to 500 simultaneous users chating. We implement Watson Assistance calls with 'watson-conversation-v1´ node.

At peak times whe are getting "ApiKey basesd rate limit for calls to /token" error message. IBM Labs says that´s because we generate a Auth every message that sent to Watson Assistance service.

Anyone get this error too?

I am not very knowledgeable about the Watson APIs and NodeRed implementation, is it possible to reuse an instance of IamAuthenticator between multiple calls to the service?

chughts commented 3 years ago

The Assistant node could be reworked to cache an Authenticator until it expires.

I am open to pull requests with this change.