General questions

What are the main EdgeKV features?

EdgeKV product features include:

  • Key-Value database. Stores data in string or JSON format.
  • JavaScript helper library. Abstracts CRUD data operations on EdgeKV databases from inside EdgeWorkers code.
  • Replicated storage. Ensures high availability of stored data by replicating it across multiple geographic locations based on the configured geoLocation of each namespace.
  • Administrative API. Enables control of EdgeKV database functions outside EdgeWorkers code.
  • Tokenized access. Enforces access controls to EdgeKV databases.

What are the prerequisites for EdgeKV?

The primary prerequisite for EdgeKV is the EdgeWorkers Dynamic Compute product on contract. EdgeWorkers itself requires an underlying ‚ÄčAkamai‚Äč delivery product. Refer to the EdgeWorkers limitations section for a complete list of supported delivery products.

How do I gain access to EdgeKV?

If you're an ‚ÄčAkamai‚Äč customer interested in participating in the EdgeKV program, you can use the Marketplace app store to provision EdgeKV, or speak with your ‚ÄčAkamai‚Äč account representative. If you're not a current ‚ÄčAkamai‚Äč customer, submit a request using this form.

Does EdgeKV use a strong or eventual consistency model?

EdgeKV uses an eventual consistency model to achieve high availability.

When I write a value, why doesn't it show up immediately?

EdgeKV is an eventually consistent system. This means that there's a period of time (called the ‚Äúinconsistency window‚ÄĚ) when a write operation must propagate across the network to update that object. Before a read operation can be consistently completed against that object, this window of time must expire. This period of time is 10 seconds or less in the majority of cases.

How do I create a group?

Groups can only be created in tandem with the creation of an item to store in that group. They cannot be directly created. A group is automatically created for you if it doesn't already exist when using an API call or a CLI command.

How is data stored in EdgeKV?

EdgeKV stores data as unstructured text objects that are not strongly typed. Please specify the data return format using the getText() or getJSON() library helper method. ‚ÄčAkamai‚Äč automatically transforms text into a JSON object.

Can I delete a namespace?

Currently you cannot delete a namespace via the API or CLI. In the future this functionality will be available with some safeguards to avoid accidental deletion. Until then, you can configure the retention period to automatically handle the deletion of data that is not updated within the retention period. To immediately delete a namespace contact ‚ÄčAkamai‚Äč to perform the deletion on your behalf. For example, you might require an immediate deletion if you're about to reach the limit on the number of namespaces per account. Please note that this deletion is permanent and irreversible once completed.

If I set an infinite retention period, is it durable over time, or do I need to refresh it periodically?

Indefinite retention means that data will persist until it is explicitly deleted.

If I write data to EdgeKV using the putJSON() method or via the CLI write jsonfile command, can I read the data back as plain text?

No. The mismatch of formats may return data in an unexpected manner, such as text that includes extra quotes. You should strive to write and read data using the same format and method. For example, to read data back as plain text with the getText method, you should write the data using the putText() method in your EdgeWorkers code.

What happens when I issue a delete?

When you issue a delete request for a specific item via the management API or CLI, or from an EdgeWorkers function, the item is marked for deletion. If the request is valid and the target namespace exists, a 200 response is returned as soon as the item is marked for deletion. If the item (and group) exist, it will be deleted within the consistency window (~10 sec).

What happens if I try to delete a non-existent item?

If the item or group does not exist, then the delete request will do nothing. All delete requests, even those for non-existent items, are billable.

Should I check if an item exists before deleting it?

No, we do not recommend doing so due to the eventual consistency nature of EdgeKV. A request for an item that was recently added may return a 404 response during the inconsistency window. Also, if you request an item marked for deletion it may return a valid value during the inconsistency window. This may lead you to perform multiple deletes unnecessarily.

Did this page help you?