Skip to content

Commit 5c93768

Browse files
committed
Project architecture design document
This is architecture proposal for MVP version of the product. When MVP is done it'll be revisited to verify whether it (still) works well.
1 parent 5a108bb commit 5c93768

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docs/design/architecture.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 provide
13+
support required use case directly, e.g., “I want to 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+
*Figure 1: Project architecture overview*
18+
19+
Rationale for having a backend that implements business logic:
20+
21+
* Clear separation between the presentation layer (frontend) and business logic layer (backend).
22+
This is because every action goes through API.
23+
* Transactional actions are easier to implement on the backend than on the frontend. Examples of
24+
such actions: "Create a replication controller and a service for it" or "Do a rolling update".
25+
* Possible code reuse from existing tools (e.g., kubectl) and upstream contributions to the tools.
26+
* Speed: getting composite data from beckends is faster on the backend (if it runs close to the
27+
data sources). For example, getting a list of pods with their CPU utilization timeline
28+
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)