Distributed Cloud Code Execution via Nested Isolation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current cloud computing platforms face inefficiencies due to high overhead from context switching and resource-intensive virtual machines, leading to slow startup times and increased costs, especially when handling spikes in demand or global user bases, and struggle with caching static content effectively.

Innovation Solution

A distributed cloud computing network that executes third-party code in isolated execution environments within a single process, using a geographically distributed key-value store for reduced latency and memory usage, allowing applications to run without an origin server and enabling efficient caching of static assets.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If virtual machines are used to run web application code, then isolation and independent management are improved, but startup time increases to tens of seconds and cost increases

Engineering Contradiction:
ImproveisolationVSAvoidstartup time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent embeds multiple isolated execution environments within a single process, nesting the isolation mechanism inside the process boundary rather than requiring separate process boundaries. This allows multiple isolated code executions to share the same process resources while maintaining isolation through internal boundaries, eliminating the need to spin up new processes for each code execution.

Inventive Principle:
Principle #7Nested doll (Nesting)

Solution Approach 2:

The patent merges multiple isolated execution environments into a single process, combining what would traditionally require separate virtual machine instances into one shared process space. This consolidation allows rapid switching between isolated code executions without the overhead of process creation and destruction, reducing startup time from tens of seconds to milliseconds.

Inventive Principle:
Principle #5Merging (Combining)

2Use of energy by moving object

If containerized processes are used to execute code, then resource efficiency is improved compared to virtual machines, but context switching overhead increases due to OS-level process isolation

Engineering Contradiction:
Improveresource efficiencyVSAvoidcontext switching overhead
Core Design Contradiction:
Use of energy by moving objectVSLoss of time

Solution Approach 1:

The patent segments the execution environment into isolated contexts within a single process, creating logical boundaries without requiring operating system process boundaries. Each isolated execution environment maintains its own state and memory space through internal segmentation mechanisms, allowing rapid context switching without OS-level overhead while preserving resource efficiency.

Inventive Principle:
Principle #1Segmentation

3Reliability

If containerized processes are spawned for each request, then code isolation is improved, but startup time increases to hundreds of milliseconds to seconds due to cold starts

Engineering Contradiction:
Improvecode isolationVSAvoidcold start time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary action by pre-establishing the process infrastructure and isolation mechanisms before requests arrive. Multiple isolated execution environments are prepared in advance within the single process, so when requests come in, the code can be executed immediately in pre-configured isolated contexts without the delay of spawning new processes. This eliminates cold start delays while maintaining code isolation.

Inventive Principle:
Principle #10Preliminary action

4Productivity

If multiple processes are run to handle concurrent requests, then parallel processing capability is improved, but context switching overhead increases significantly

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidcontext switching overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent merges multiple execution contexts into a single process, combining what would traditionally require separate processes into one unified process space. This allows the system to handle concurrent requests in parallel through internal threading or async mechanisms while avoiding the expensive OS-level context switching that occurs when switching between separate processes, thus improving productivity without the associated overhead.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS11853806B2Cloud computing platform that executes third-party code in a distributed cloud computing network and uses a distributed data store
Publication Date: 2023.12.26 CLOUDFLARE INC
  • US11853806B2 patent drawing
  • US11853806B2 patent drawing
  • US11853806B2 patent drawing

AI summary

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.