# what happens

> 「输入 URL 后发生什么」系列提纲：location 解析 hostname、dig 查 IP，以及 CDN、TCP/HTTP 与 dig/ss 等命令节。

- 发布于: 2019-11-02
- 更新于: 2026-09-30
- 原文: https://shanyue.tech/posts/what-happens/readme/
- 标签: network
- 专栏: 互联网协议

---

## IO与中断

## URL 解析

通过 url 解析获取 hostname

```javascript
// 在浏览器环境中访问 location

> location.host
shanyue.tech

> location.protocal
https
```

## DNS

解析 hostname 对应的 IP 地址

```shell
$ dig shanyue.tech +short
shanyue.netlify.com.
206.189.89.118

$ dig shici.xiange.tech +short
59.110.216.155
```

## CDN

- [DNS负载均衡与CDN原理结合](https://www.jianshu.com/p/05eb8365ab5f)

## UDP

## TCP

```shell

```

## http

## https

##

## 命令

### dig

### nslookup

### host

### ss

```shell

```

### netstat

## 时间度量

## 术语

## Q&A
