Skip to content

Commit

Permalink
(#9) Add network basics post
Browse files Browse the repository at this point in the history
  • Loading branch information
ambersun1234 committed May 6, 2024
1 parent cee47e1 commit d3e5b7d
Show file tree
Hide file tree
Showing 11 changed files with 485 additions and 40 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
git add .
git commit -m "Update og image"
git push
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: og-image
path: ${{ github.workspace }}/assets/img/og

build_and_deploy:
runs-on: ubuntu-latest
Expand All @@ -59,6 +64,11 @@ jobs:
restore-keys: |
${{ runner.os }}-gems-
- uses: actions/download-artifact@v4
with:
name: og-image
path: ${{ github.workspace }}/assets/img/og

# Use GitHub Deploy Action to build and deploy to Github
# For latest version: `jeffreytse/jekyll-deploy-action@master`
# This is a specific version for supporting og:image with libpng pre installed
Expand Down
3 changes: 3 additions & 0 deletions _posts/container/2024-02-12-container-docker-to-k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ docker 有自己內建的 dns server, 這也解釋了為什麼我們可以單純
而你每一次呼叫 "web" service 的時候,dns server 都要決定要給你哪一個 ip 對吧\
所以負載平衡這段其實是由 docker 內建的 dns server 幫你做掉了

> 有關 DNS load balancing\
> 可參考 [重新認識網路 - 從基礎開始 \| Shawn Hsu](../../network/networking-basics)
你說可是上面我們還是使用了 nginx 阿\
那是因為每一個 replica service 都使用了相同的 port number(這個會造成 error), 我們需要一個統一的進入點存取\
所以這裡才使用了 nginx
Expand Down
4 changes: 2 additions & 2 deletions _posts/network/2022-04-28-network-osi.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ OSI 七層模型是由 [國際電信聯盟電信標準化部門 - ITU-T](https:/
<hr>

常見的協議如 [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) 以及 [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) 都是跑在傳輸層之上的協議
<!-- > 詳細的討論可以參考 [重新認識網路 - TCP/IP \| Shawn Hsu](../networking-tcp) 以及 [重新認識網路 - UDP \| Shawn Hsu](../networking-udp) -->
> 詳細的討論可以參考 [重新認識網路 - 從基礎開始 \| Shawn Hsu](../../network/networking-basics)
## Network Layer - 3
網路層主要是作 routing 的功能\
Expand Down Expand Up @@ -117,7 +117,7 @@ hop 這個東西簡單講就是,`經過的中繼站點個數`, 它也可以用
layer 3 switch 以及 IP 分享器 都是網路層的設備

除此之外,[Internet Protocol IP](https://en.wikipedia.org/wiki/Internet_Protocol) 也是跑在網路層的上的協議
<!-- > 詳細關於 TCP/IP 的討論可以參考 [重新認識網路 - TCP/IP \| Shawn Hsu](../networking-tcp) -->
> 詳細的討論可以參考 [重新認識網路 - 從基礎開始 \| Shawn Hsu](../../network/networking-basics)
## Data Link Layer - 2
資料連結層為了提供 [connectionless-mode](https://en.wikipedia.org/wiki/Connectionless_communication) 以及 connection-mode,所以它必須提供了一系列的連線建立、維護\
Expand Down
Loading

0 comments on commit d3e5b7d

Please sign in to comment.