Skip to content

Commit 4857aa4

Browse files
committed
Merge pull request #32 from kubernetes/architecture-design-doc
Project architecture design document
2 parents 69c453f + baaf39f commit 4857aa4

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

docs/design/architecture.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Architecture
2+
Kubernetes Console project consists of two main components. They are called here the
3+
frontend and the backend.
4+
5+
The frontend is a single page web application that runs in a browser. It fetches all its
6+
business data from the backend using standard HTTP methods. It does not implement business logic;
7+
it only presents fetched data and sends requests to the backend for actions.
8+
9+
The backend runs in a Kubernetes cluster as a kubernetes service. Alternatively, it may run anywhere
10+
outside of the cluster, given that it can connect to the master. The backend is a HTTP server that
11+
proxies data requests to appropriate remote backends (e.g., k8s apiserver or heapster) or implements
12+
business logic. The backend implements business logic when remote backends APIs do not
13+
support required use case directly, e.g., “get a list of pods with their CPU usage metric
14+
timeline”. Figure 1 outlines the architecture of the project.
15+
16+
![Architecture Overview](architecture.png?raw=true "Architecture overview")
17+
18+
*Figure 1: Project architecture overview*
19+
20+
Rationale for having a backend that implements business logic:
21+
22+
* Clear separation between the presentation layer (frontend) and business logic layer (backend).
23+
This is because every action goes through well defined API.
24+
* Transactional actions are easier to implement on the backend than on the frontend. Examples of
25+
such actions: "create a replication controller and a service for it" or "do a rolling update".
26+
* Possible code reuse from existing tools (e.g., kubectl) and upstream contributions to the tools.
27+
* Speed: getting composite data from backends is faster on the backend (if it runs close to the
28+
data sources). For example, getting a list of pods with their CPU utilization timeline
29+
requires at least two requests. Doing them on the backend shortens RTT.

docs/design/architecture.png

18.5 KB
Loading

0 commit comments

Comments
 (0)