Inconvenience with complete keyval zone updates
August 25, 2019 10:03AM
The current NGINX API version 4 specifies an endpoint /http/keyvals/{httpKeyvalZoneName}.

The POST operation only allows a list of entries to be specified if the map is empty.

In order to simplify updates of complete mappings, one would have to either use DELETE to clear the map and then POST with multiple entries to upload the desired list, or use a Javascript handler to run through the list of pairs to set, and then remove any items that were in the original map, but are not supposed to be there in the new map.

This creates unnecessary complexity in my opinion - apart from that, there are issues with race conditions or with the map being temporarily empty between the steps of DELETE and POST. An atomic update of maps should be supported independent of whether they are empty or now. When such updates occur, they should also immediately be propagated if "sync" is specified.

Therefore, I suggest to drop the limitation of only supporting single tuples in POST requests if the map is not empty.

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 65
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready