IP Library Granted Patent US 11,068,586
Granted Patent B2
US 11,068,586 · App. 15/146,002 · Granted Jul 20, 2021

Virtual host isolation

Inventor: Nan Li (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F21/53G06F9/45504G06F9/5011G06F16/958G06F21/44H04L67/02H04L67/32
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,068,586
App. No.
15/146,002
Granted
Jul 20, 2021
Kind
B2
Abstract

One embodiment of the present invention provides a system for isolating virtual hosts on a network server device. During operation, the system creates a container for a virtual host of a plurality of virtual hosts of a web server running on the network server device. A respective virtual host of the plurality of virtual hosts represents a website running on the web server. If the system receives a web request for a dynamic resource from a client, the system identifies the virtual host as associated with the web request. The system then runs a script interpreter process for generating the dynamic resource in the container and sends a response message comprising the dynamic resource to the client.

Claims (47)

1. A computer-implemented method for isolating virtual hosts on a computing system, comprising:

creating, by the computing system, a container for a virtual host of a web server running on the computing system by creating a directory tree for the virtual host and setting a home directory of the directory tree as a root directory for the virtual host;

operating a container process manager on the virtual host in the container;

in response to receiving a web request for a dynamic web resource from a client by the container process manager on the virtual host,

spawning a child process from the container process manager and restricting the child process within the container and a process identifier (PID) namespace for the virtual host of the web server;

running the child process for generating the dynamic web resource in the container; and

sending, by the container process manager, a response message comprising the dynamic web resource to the client.

2. The method of claim 1 ,

wherein the directory tree includes one or more common resource utilization directories.

3. The method of claim 1 , wherein a respective process identifier of the virtual host is generated from the PID namespace.

4. The method of claim 1 , further comprising maintaining a mapping between a virtual host identifier of the virtual host and the PID namespace.

5. The method of claim 1 , wherein the container process manager is further configured to:

run in the container of the virtual host; and

manage processes of the virtual host.

6. The method of claim 1 , wherein the container process manager is a parent process within the container of the virtual host, and wherein the child process is a script interpreter process capable of operating with the web server.

7. The method of claim 1 , further comprising, in response to detecting a failure of the container process manager for a second web request from the client, sending an error message to the client.

8. The method of claim 1 , further comprising sending a request from the container process manager to the web server, wherein the request comprises a process identifier from the PID namespace and a virtual host identifier of the virtual host, and wherein the request indicates a request for registering the container with the web server.

9. A non-transitory computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for isolating virtual hosts on a computing system, the method comprising:

creating, by the computing system, a container for a virtual host of a web server running on the computing system by creating a directory tree for the virtual host and setting a home directory of the directory tree as a root directory for the virtual host;

operating a container process manager on the virtual host in the container;

in response to receiving a web request for a dynamic web resource from a client by the container process manager on the virtual host,

spawning a child process from the container process manager and restricting the child process within the container and a process identifier (PID) namespace for the virtual host of the web server;

running the child process for generating the dynamic web resource in the container; and

sending, by the container process manager, a response message comprising the dynamic web resource to the client.

10. The non-transitory computer-readable storage medium of claim 9

wherein the directory tree includes one or more common resource utilization directories.

11. The non-transitory computer-readable storage medium of claim 9 , wherein a respective process identifier of the virtual host is generated from the PID namespace.

12. The non-transitory computer-readable storage medium of claim 9 , wherein the method further comprises maintaining a mapping between a virtual host identifier of the virtual host and the PID namespace.

13. The non-transitory computer-readable storage medium of claim 9 , wherein the container process manager is further configured to:

run in the container of the virtual host; and

manage processes of the virtual host.

14. The non-transitory computer-readable storage medium of claim 9 , wherein the container process manager is a parent process within the container of the virtual host, and wherein the child process is a script interpreter process capable of operating with the web server.

15. The non-transitory computer-readable storage medium of claim 9 , wherein the method further comprises, in response to detecting a failure of the container process manager for a second web request from the client, sending an error message to the client.

16. The non-transitory computer-readable storage medium of claim 9 , wherein the method further comprises sending a request from the container process manager to the web server, wherein the request comprises a process identifier from the PID namespace and a virtual host identifier of the virtual host, and wherein the request indicates a request for registering the container with the web server.

17. A computing system for facilitating dynamic load-based merging, the computing system comprising:

a processor; and

a memory coupled to the processor and storing instructions, which when executed by the processor cause the processor to perform a method, the method comprising:

creating, by the computing system, a container for a virtual host of a web server running on the computing system by creating a directory tree for the virtual host and setting a home directory of the directory tree as a root directory for the virtual host;

operating a container process manager on the virtual host in the container;

in response to receiving a web request for a dynamic web resource from a client by the container process manager on the virtual host,

spawning a child process from the container process manager and restricting the child process within the container and a process identifier (PID) namespace for the virtual host of the web server;

running the child process for generating the dynamic web resource in the container; and

sending, by the container process manager, a response message comprising the dynamic web resource to the client.

18. The computing system of claim 17 ,

wherein the directory tree includes one or more common resource utilization directories.

19. The computing system of claim 17 , wherein a respective process identifier of the virtual host is generated from the PID namespace.

20. The computing system of claim 17 , wherein the method further comprises, in response to detecting a failure of the container process manager for a second web request from the client, sending an error message to the client.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 1, 2016
From: LI, NAN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 039239/0525 →
Priority Claims (1)
CN 201510226829.8 · May 6, 2015 · national
Continuity (1)
Related Publication 20160330073A1 · Nov 10, 2016