IP Library Granted Patent US 10,348,851
Granted Patent B1
US 10,348,851 · App. 16/207,034 · Granted Jul 9, 2019

Proxy server streaming a resource to multiple requesting client devices while the resource is being received at the proxy server

Inventors: Ka-Hing Cheung (San Francisco, CA); Jonathan Philip Levine (San Francisco, CA); Robert Alan Mitchell Burke (San Francisco, CA)
Assignee: CLOUDFLARE, INC.
H04L67/2842G06F16/172H04L65/60H04L67/327
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 10,348,851
App. No.
16/207,034
Granted
Jul 9, 2019
Kind
B1
Abstract

A first server receives a request for a file from a first client device. The first server determines that the file is not fully available in a cache that is available to the first server and receives at least a portion of the file from a second server. While the file is being received, the first server writes data of the file to a temporary cache file as it is being received; streams the file to the first client device from the temporary cache file; receives a request for the file from a second client device; and streams the file to the second client device from the temporary cache file without waiting for the requested file to be fully received at the first server and without transmitting an additional request for the file to the second server.

Claims (68)

1. A method, comprising:

receiving, at a first server, a first request for a file from a first client device;

determining that the file is not fully available in a cache that is available to the first server;

transmitting a second request for the file to a second server;

receiving at least a portion of the requested file; and

while the at least the portion of the requested file is being received, performing the following:

writing data of the file to a temporary cache file as it is being received, wherein the temporary cache file is available to multiple processes on the first server;

streaming the file to the first client device from the temporary cache file;

receiving, at the first server, a third request for the file from a second client device; and

streaming the file to the second client device from the temporary cache file without waiting for the requested file to be fully received at the first server and without transmitting an additional request for the file to the second server.

2. The method of claim 1 , wherein while the at least the portion of the requested file is being received, further setting a field in a structure that is available to multiple processes on the first server that indicates the file is currently being received from the second server.

3. The method of claim 1 , wherein the second server is an origin server for the file.

4. The method of claim 3 , wherein the first server is a proxy server that receives the first request because a Domain Name System (DNS) request for a hostname of the file returns an IP address of the proxy server instead of an IP address of the origin server.

5. The method of claim 1 , wherein a first request process processes the first request including streaming the file to the first client device, and wherein a second request process processes the third request including streaming the file to the second client device.

6. The method of claim 1 , further comprising:

setting a max time for receiving the requested file;

determining that the max time for receiving the requested file has been exceeded;

transmitting a fourth request for the file to the second server;

receiving at least a portion of the file from the second server in response to the fourth request;

while the at least the portion of the requested file is being received, writing data of the file to a different temporary cache file as it is being received; and

streaming the file to the first client device and the second client device from the different temporary cache file.

7. The method of claim 1 , wherein the file is a binary file.

8. A non-transitory machine-readable storage medium that stores instructions, that when executed by a processor of a first server, causes said processor to perform operations comprising:

receiving, at the first server, a first request for a file from a first client device;

determining that the file is not fully available in a cache that is available to the first server;

transmitting a second request for the file to a second server;

receiving at least a portion of the requested file; and

while the at least the portion of the requested file is being received, performing the following:

writing data of the file to a temporary cache file as it is being received, wherein the temporary cache file is available to multiple processes on the first server;

streaming the file to the first client device from the temporary cache file;

receiving, at the first server, a third request for the file from a second client device; and

streaming the file to the second client device from the temporary cache file without waiting for the requested file to be fully received at the first server and without transmitting an additional request for the file to the second server.

9. The non-transitory machine-readable storage medium of claim 8 , wherein while the at least the portion of the requested file is being received, further setting a field in a structure that is available to multiple processes on the first server that indicates the file is currently being received from the second server.

10. The non-transitory machine-readable storage medium of claim 8 , wherein the second server is an origin server for the file.

11. The non-transitory machine-readable storage medium of claim 10 , wherein the first server is a proxy server that receives the first request because a Domain Name System (DNS) request for a hostname of the file returns an IP address of the proxy server instead of an IP address of the origin server.

12. The non-transitory machine-readable storage medium of claim 8 , wherein a first request process processes the first request including streaming the file to the first client device, and wherein a second request process processes the third request including streaming the file to the second client device.

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

setting a max time for receiving the requested file;

determining that the max time for receiving the requested file has been exceeded;

transmitting a fourth request for the file to the second server;

receiving at least a portion of the file from the second server in response to the fourth request;

while the at least the portion of the requested file is being received, writing data of the file to a different temporary cache file as it is being received; and

streaming the file to the first client device and the second client device from the different temporary cache file.

14. The non-transitory machine-readable storage medium of claim 8 , wherein the file is a binary file.

15. A first server, comprising:

a processor; and

a non-transitory machine-readable storage medium that provides instructions that, when executed by the processor, causes the first server to perform operations including:

receive, at the first server, a first request for a file from a first client device;

determine that the file is not fully available in a cache that is available to the first server;

transmit a second request for the file to a second server;

receive at least a portion of the requested file; and

while the at least the portion of the requested file is being received, perform the following:

write data of the file to a temporary cache file as it is being received, wherein the temporary cache file is to be available to multiple processes on the first server;

stream the file to the first client device from the temporary cache file;

receive, at the first server, a third request for the file from a second client device; and

stream the file to the second client device from the temporary cache file without waiting for the requested file to be fully received at the first server and without transmitting an additional request for the file to the second server.

16. The first server of claim 15 , wherein while the requested file is being received, further set a field in a structure that is to be available to multiple processes on the first server that indicates the file is currently being received from the second server.

17. The first server of claim 15 , wherein the second server is an origin server for the file.

18. The first server of claim 17 , wherein the first server is a proxy server that receives the first request because a Domain Name System (DNS) request for a hostname of the file returns an IP address of the proxy server instead of an IP address of the origin server.

19. The first server of claim 15 , wherein a first request process is to process the first request including streaming the file to the first client device, and wherein a second request process is to process the third request including streaming the file to the second client device.

20. The first server of claim 15 , wherein the operations further comprise:

set a max time for receiving the requested file;

determine that the max time for receiving the requested file has been exceeded;

transmit a fourth request for the file to the second server;

receive at least a portion of the file from the second server in response to the fourth request;

while the at least the portion of the requested file is being received, write data of the file to a different temporary cache file as it is being received; and

stream the file to the first client device and the second client device from the different temporary cache file.

21. The first server of claim 15 , wherein the file is a binary file.

Assignments (2)
SECURITY INTEREST Recorded May 20, 2024
From: CLOUDFLARE, INC.
To: CITIBANK, N.A.
Reel/Frame 067472/0246 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 26, 2019
From: CHEUNG, KA-HING; LEVINE, JONATHAN PHILIP; MITCHELL BURKE, ROBERT ALAN
To: CLOUDFLARE, INC.
Reel/Frame 049012/0034 →
Cited By (1)
US 12,452,345