You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-22Lines changed: 24 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,28 +122,6 @@ The following APIs are not part of the fftokens standard, but are exposed under
122
122
123
123
-`GET /receipt/:id` - Get receipt for a previous request
124
124
125
-
## Retry behaviour
126
-
127
-
Most short-term outages should be handled by the blockchain connector. For example if the blockchain node returns `HTTP 429` due to rate limiting
128
-
it is the blockchain connector's responsibility to use appropriate back-off retries to attempt to make the required blockchain call successfully.
129
-
130
-
There are cases where the token connector may need to perform it's own back-off retry for a blockchain action. For example if the blockchain connector
131
-
microservice has crashed and is in the process of restarting just as the token connector is trying to query an NFT token URI to enrich a token event, if
132
-
the token connector doesn't perform a retry then the event will be returned without the token URI populated.
133
-
134
-
The token connector has configurable retry behaviour for all blockchain related calls. By default the connector will perform up to 15 retries with a back-off
135
-
interval between each one. The default first retry interval is 100ms and doubles up to a maximum of 10s per retry interval. Retries are only performed where
136
-
the error returned from the REST call matches a configurable regular expression retry condition. The default retry condition is `._ECONN._` which ensures
137
-
retries take place for common TCP errors such as `ECONNRESET` and `ECONNREFUSED`.
138
-
139
-
Setting the retry condition to "" disables retries. The configurable retry settings are:
140
-
141
-
-`RETRY_BACKOFF_FACTOR` (default `2`)
142
-
-`RETRY_BACKOFF_LIMIT_MS` (default `10000`)
143
-
-`RETRY_BACKOFF_INITIAL_MS` (default `100`)
144
-
-`RETRY_CONDITION` (default `.*ECONN.*`)
145
-
-`RETRY_MAX_ATTEMPTS` (default `15`)
146
-
147
125
## Running the service
148
126
149
127
The easiest way to run this service is as part of a stack created via
@@ -202,3 +180,27 @@ $ npm run lint
202
180
# formatting
203
181
$ npm run format
204
182
```
183
+
184
+
## Blockchain retry behaviour
185
+
186
+
Most short-term outages should be handled by the blockchain connector. For example if the blockchain node returns `HTTP 429` due to rate limiting
187
+
it is the blockchain connector's responsibility to use appropriate back-off retries to attempt to make the required blockchain call successfully.
188
+
189
+
There are cases where the token connector may need to perform its own back-off retry for a blockchain action. For example if the blockchain connector
190
+
microservice has crashed and is in the process of restarting just as the token connector is trying to query an NFT token URI to enrich a token event, if
191
+
the token connector doesn't perform a retry then the event will be returned without the token URI populated.
192
+
193
+
The token connector has configurable retry behaviour for all blockchain related calls. By default the connector will perform up to 15 retries with a back-off
194
+
interval between each one. The default first retry interval is 100ms and doubles up to a maximum of 10s per retry interval. Retries are only performed where
195
+
the error returned from the REST call matches a configurable regular expression retry condition. The default retry condition is `.*ECONN.*` which ensures
196
+
retries take place for common TCP errors such as `ECONNRESET` and `ECONNREFUSED`.
197
+
198
+
The configurable retry settings are:
199
+
200
+
-`RETRY_BACKOFF_FACTOR` (default `2`)
201
+
-`RETRY_BACKOFF_LIMIT_MS` (default `10000`)
202
+
-`RETRY_BACKOFF_INITIAL_MS` (default `100`)
203
+
-`RETRY_CONDITION` (default `.*ECONN.*`)
204
+
-`RETRY_MAX_ATTEMPTS` (default `15`)
205
+
206
+
Setting `RETRY_CONDITION` to `""` disables retries. Setting `RETRY_MAX_ATTEMPTS` to `-1` causes it to retry indefinitely.
0 commit comments