IP Library Granted Patent US 11,853,806
Granted Patent B2
US 11,853,806 · App. 17/035,193 · Granted Dec 26, 2023

Cloud computing platform that executes third-party code in a distributed cloud computing network and uses a distributed data store

Inventors: Ashley Williams (Austin, TX); Joaquin Madruga (Austin, TX); Ashley Lewis (Austin, TX)
Assignee: CLOUDFLARE, INC.
G06F9/5072G06F8/433G06F21/53G06F21/57
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,853,806
App. No.
17/035,193
Granted
Dec 26, 2023
Kind
B2
Abstract

A compute server receives a request from a client device that triggers execution of a third-party code piece. The compute server is one of multiple compute servers that are part of a distributed cloud computing network. The third-party code piece is executed at the compute server and causes a value to be read from a distributed key-value store and/or written to the distributed key-value store. A response is generated to the request based at least in part on the executed third-party code piece, and the generated response is transmitted to the client device.

Claims (77)

1. A method, comprising:

receiving, at a first one of a plurality of compute servers from a first client device, a first request that triggers execution of a first one of a plurality of third-party code pieces, wherein the first compute server is one of the plurality of compute servers that are part of a distributed cloud computing network, wherein the first one of the plurality of third-party code pieces is configured to, when executed, retrieve at least one value from a distributed key-value store;

executing the first one of the plurality of third-party code pieces, wherein executing the first one of the plurality of third-party code pieces includes retrieving at least one value from the distributed key-value store, wherein retrieving the at least one value from the distributed key-value store includes performing the following:

determining that the value is not available in a cached distributed key-value store for the first one of the plurality of compute servers, and responsive to this determination,

retrieving the value from the distributed key-value store located in a central storage, and

inserting the retrieved value into the cached distributed key-value store;

generating a response to the first request based at least in part on the executed first one of the plurality of third-party code pieces; and

transmitting the generated response to the first client device.

2. The method of claim 1 , wherein the first one of the plurality of third-party code pieces is executed by a single process at the first one of the plurality of compute servers, wherein the first one of the plurality of third-party code pieces is run in a first one of a plurality of isolated execution environments, and wherein each of the other plurality of third-party code pieces are run in the other plurality of isolated execution environments respectively and executed by the single process.

3. The method of claim 1 , further comprising:

receiving, at the first one of a plurality of compute servers from a second client device, a second request that triggers execution of a second one of a plurality of third-party code pieces, wherein the second one of the plurality of third-party code pieces is configured to, when executed, write at least one value from a distributed key-value store;

executing the second one of the plurality of third-party code pieces, wherein executing the second one of the plurality of third-party code pieces including writing at least one value to the distributed key-value store, wherein writing the at least one value to the distributed key-value store includes performing the following:

writing the value to the cached distributed key-value store, and

writing the value to the distributed key-value store located in the central storage;

generating a response to the second request based at least in part on the executed second one of the plurality of third-party code pieces; and

transmitting the generated response to the second client device.

4. The method of claim 1 , further comprising:

wherein a set of one or more static assets of a web site are cached in the cached distributed key-value store,

receiving, at the first one of a plurality of compute servers from a third client device, a third request that triggers execution of a third one of a plurality of third-party code pieces;

executing the third one of the plurality of third-party code pieces including performing the following:

retrieving the at least one of the set of one or more static assets of the website from the cached distributed key-value store without accessing an origin server for the at least one of the set of one or more static assets of the website;

causing a response to be generated to the third request including determining one or more headers for the request; and

transmitting the generated response to the third client device that includes the retrieved at least one of the set of one or more static assets of the website.

5. The method of claim 1 , wherein each of the plurality of compute servers are anycasted to a same IP address, and wherein the first one of the plurality of compute servers receives the request because it is closest one of the plurality of compute servers to the client device as determined by an anycast implementation.

6. The method of claim 1 , wherein the plurality of third-party code pieces are provided by one or more operators or owners of a domain.

7. A non-transitory machine-readable storage medium that provides instructions that, when executed by a processor, causes said processor to perform the following operations:

receiving, at a first one of a plurality of compute servers from a first client device, a first request that triggers execution of a first one of a plurality of third-party code pieces, wherein the first compute server is one of the plurality of compute servers that are part of a distributed cloud computing network, wherein the first one of the plurality of third-party code pieces is configured to, when executed, retrieve at least one value from a distributed key-value store;

executing the first one of the plurality of third-party code pieces, wherein executing the first one of the plurality of third-party code pieces includes retrieving at least one value from the distributed key-value store, wherein retrieving the at least one value from the distributed key-value store includes performing the following:

determining that the value is not available in a cached distributed key-value store for the first one of the plurality of compute servers, and responsive to this determination,

retrieving the value from the distributed key-value store located in a central storage, and

inserting the retrieved value into the cached distributed key-value store;

generating a response to the first request based at least in part on the executed first one of the plurality of third-party code pieces; and

transmitting the generated response to the first client device.

8. The non-transitory machine-readable storage medium of claim 7 , wherein the first one of the plurality of third-party code pieces is executed by a single process at the first one of the plurality of compute servers, wherein the first one of the plurality of third-party code pieces is run in a first one of a plurality of isolated execution environments, and wherein each of the other plurality of third-party code pieces are run in the other plurality of isolated execution environments respectively and executed by the single process.

9. The non-transitory machine-readable storage medium of claim 7 , wherein the operations further comprise:

receiving, at the first one of a plurality of compute servers from a second client device, a second request that triggers execution of a second one of a plurality of third-party code pieces, wherein the second one of the plurality of third-party code pieces is configured to, when executed, write at least one value from a distributed key-value store;

executing the second one of the plurality of third-party code pieces, wherein executing the second one of the plurality of third-party code pieces including writing at least one value to the distributed key-value store, wherein writing the at least one value to the distributed key-value store includes performing the following:

writing the value to the cached distributed key-value store, and

writing the value to the distributed key-value store located in the central storage;

generating a response to the second request based at least in part on the executed second one of the plurality of third-party code pieces; and

transmitting the generated response to the second client device.

10. The non-transitory machine-readable storage medium of claim 7 , wherein the operations further comprise:

wherein a set of one or more static assets of a web site are cached in the cached distributed key-value store,

receiving, at the first one of a plurality of compute servers from a third client device, a third request that triggers execution of a third one of a plurality of third-party code pieces;

executing the third one of the plurality of third-party code pieces including performing the following:

retrieving the at least one of the set of one or more static assets of the website from the cached distributed key-value store without accessing an origin server for the at least one of the set of one or more static assets of the website;

causing a response to be generated to the third request including determining one or more headers for the request; and

transmitting the generated response to the third client device that includes the retrieved at least one of the set of one or more static assets of the website.

11. The non-transitory machine-readable storage medium of claim 7 , wherein each of the plurality of compute servers are anycasted to a same IP address, and wherein the first one of the plurality of compute servers receives the request because it is closest one of the plurality of compute servers to the client device as determined by an anycast implementation.

12. The non-transitory machine-readable storage medium of claim 7 , wherein the plurality of third-party code pieces are provided by one or more operators or owners of a domain.

13. An apparatus, comprising:

a processor; and

a non-transitory machine-readable storage medium that provides instructions that, if executed by the processor, will cause the processor to perform the following operations:

receiving, at a first one of a plurality of compute servers from a first client device, a first request that triggers execution of a first one of a plurality of third-party code pieces, wherein the first compute server is one of the plurality of compute servers that are part of a distributed cloud computing network, wherein the first one of the plurality of third-party code pieces is configured to, when executed, retrieve at least one value from a distributed key-value store;

executing the first one of the plurality of third-party code pieces, wherein executing the first one of the plurality of third-party code pieces includes retrieving at least one value from the distributed key-value store, wherein retrieving the at least one value from the distributed key-value store includes performing the following:

determining that the value is not available in a cached distributed key-value store for the first one of the plurality of compute servers, and responsive to this determination,

retrieving the value from the distributed key-value store located in a central storage, and

inserting the retrieved value into the cached distributed key-value store;

generating a response to the first request based at least in part on the executed first one of the plurality of third-party code pieces; and

transmitting the generated response to the first client device.

14. The apparatus of claim 13 , wherein the first one of the plurality of third-party code pieces is executed by a single process at the first one of the plurality of compute servers, wherein the first one of the plurality of third-party code pieces is run in a first one of a plurality of isolated execution environments, and wherein each of the other plurality of third-party code pieces are run in the other plurality of isolated execution environments respectively and executed by the single process.

15. The apparatus of claim 13 , wherein the operations further comprise:

receiving, at the first one of a plurality of compute servers from a second client device, a second request that triggers execution of a second one of a plurality of third-party code pieces, wherein the second one of the plurality of third-party code pieces is configured to, when executed, write at least one value from a distributed key-value store;

executing the second one of the plurality of third-party code pieces, wherein executing the second one of the plurality of third-party code pieces including writing at least one value to the distributed key-value store, wherein writing the at least one value to the distributed key-value store includes performing the following:

writing the value to the cached distributed key-value store, and

writing the value to the distributed key-value store located in the central storage;

generating a response to the second request based at least in part on the executed second one of the plurality of third-party code pieces; and

transmitting the generated response to the second client device.

16. The apparatus of claim 13 , wherein the operations further comprise:

wherein a set of one or more static assets of a web site are cached in the cached distributed key-value store,

receiving, at the first one of a plurality of compute servers from a third client device, a third request that triggers execution of a third one of a plurality of third-party code pieces;

executing the third one of the plurality of third-party code pieces including performing the following:

retrieving the at least one of the set of one or more static assets of the website from the cached distributed key-value store without accessing an origin server for the at least one of the set of one or more static assets of the website;

causing a response to be generated to the third request including determining one or more headers for the request; and

transmitting the generated response to the third client device that includes the retrieved at least one of the set of one or more static assets of the website.

17. The apparatus of claim 13 , wherein each of the plurality of compute servers are anycasted to a same IP address, and wherein the first one of the plurality of compute servers receives the request because it is closest one of the plurality of compute servers to the client device as determined by an anycast implementation.

18. The apparatus of claim 13 , wherein the plurality of third-party code pieces are provided by one or more operators or owners of a domain.

Assignments (1)
SECURITY INTEREST Recorded May 20, 2024
From: CLOUDFLARE, INC.
To: CITIBANK, N.A.
Reel/Frame 067472/0246 →
Continuity (2)
Provisional Application 62907462 · Sep 27, 2019
Related Publication 20210096926A1 · Apr 1, 2021
Cited By (1)
US 12,579,192