Engineering Tools for AI

Lập trình

Thuật ngữ mạng chính

Hướng dẫn tra cứu thuật ngữ mạng trong local development, browser requests, API, Docker và triển khai.

42 mục

Địa chỉ và tên

IP address

IP address

192.168.1.25

Ý nghĩa

A numeric address used to find a device on a network.

Khi dùng

Use it when another device needs to reach your computer, server, or container host.

Ví dụ

192.168.1.25

Ví dụ yêu cầu

Explain which IP address I should use from another device.

Địa chỉ và tên

IPv4

IPv4

192.168.0.10

Ý nghĩa

The common four-part IP address format.

Khi dùng

Most local network examples use IPv4 addresses such as 192.168.x.x or 10.x.x.x.

Ví dụ

192.168.0.10

Ví dụ yêu cầu

Tell me whether this address is an IPv4 local network address.

Địa chỉ và tên

IPv6

IPv6

::1

Ý nghĩa

A newer, longer IP address format designed to provide many more addresses.

Khi dùng

You may see IPv6 in logs, localhost bindings, or server network output.

Ví dụ

::1

Ví dụ yêu cầu

Explain whether this log is using IPv4 or IPv6.

Địa chỉ và tên

localhost

localhost

http://localhost:3000

Ý nghĩa

A name that means the same machine where the code or browser is running.

Khi dùng

Use it from the same computer that runs the development server.

Lưu ý

On a phone, localhost means the phone itself, not your development computer.

Ví dụ

http://localhost:3000

Ví dụ yêu cầu

Explain why localhost works on my computer but not on my phone.

Địa chỉ và tên

127.0.0.1

127.0.0.1

http://127.0.0.1:3000

Ý nghĩa

The common IPv4 loopback address for the current machine.

Khi dùng

Use it as a numeric alternative to localhost.

Ví dụ

http://127.0.0.1:3000

Ví dụ yêu cầu

Explain whether localhost and 127.0.0.1 are equivalent here.

Địa chỉ và tên

0.0.0.0

0.0.0.0

next dev -H 0.0.0.0

Ý nghĩa

An address used by servers to listen on all available network interfaces.

Khi dùng

Use it when another device on the same network needs to reach your dev server.

Lưu ý

It can expose a development server more broadly than localhost.

Ví dụ

next dev -H 0.0.0.0

Ví dụ yêu cầu

Explain whether this dev server should bind to 0.0.0.0.

Địa chỉ và tên

Hostname

Hostname

my-laptop.local

Ý nghĩa

A readable name for a device or server.

Khi dùng

Use it when a network name is easier to remember than an IP address.

Ví dụ

my-laptop.local

Ví dụ yêu cầu

Explain whether this hostname resolves to the expected IP.

Địa chỉ và tên

Domain

Domain

example.com

Ý nghĩa

A human-readable internet name for a website or service.

Khi dùng

Use domains for public sites instead of asking users to remember server IP addresses.

Ví dụ

example.com

Ví dụ yêu cầu

Explain what domain this deployed site should use.

Địa chỉ và tên

DNS

DNS

example.com -> 93.184.216.34

Ý nghĩa

The system that translates domain names into IP addresses.

Khi dùng

Use DNS records when connecting a domain to a hosting service or server.

Ví dụ

example.com -> 93.184.216.34

Ví dụ yêu cầu

Explain which DNS record is needed for this domain.

Port và kết nối

Port

Port

3000

Ý nghĩa

A number that identifies which app or service receives traffic on a machine.

Khi dùng

Development servers often use ports such as 3000, 3001, 5173, or 8000.

Ví dụ

3000

Ví dụ yêu cầu

Tell me which port this server is using.

Port và kết nối

Listen

Listen

Ready on http://localhost:3000

Ý nghĩa

A server is listening when it is ready to accept requests on an address and port.

Khi dùng

Check listening output to know which URL can be opened in the browser.

Ví dụ

Ready on http://localhost:3000

Ví dụ yêu cầu

Explain where this server is listening.

Port và kết nối

Port forwarding

Port forwarding

8080 -> 3000

Ý nghĩa

Forwarding traffic from one port or machine to another port or machine.

Khi dùng

Use it in routers, tunnels, containers, and remote development environments.

Ví dụ

8080 -> 3000

Ví dụ yêu cầu

Explain where this port is forwarded.

Port và kết nối

Firewall

Firewall

Allow incoming connections on port 3000

Ý nghĩa

A rule system that allows or blocks network traffic.

Khi dùng

Check it when a server runs locally but another device cannot connect.

Ví dụ

Allow incoming connections on port 3000

Ví dụ yêu cầu

Explain whether a firewall could block this local connection.

Yêu cầu web

URL

URL

https://example.com/docs?page=1

Ý nghĩa

The full address used to request a web resource.

Khi dùng

A URL includes protocol, host, optional port, path, query string, and sometimes a fragment.

Ví dụ

https://example.com/docs?page=1

Ví dụ yêu cầu

Break this URL into protocol, host, port, path, and query.

Yêu cầu web

Path

Path

/ko/reference/docker

Ý nghĩa

The part of a URL that identifies a route or resource on the server.

Khi dùng

Use it to understand which page or API endpoint is being requested.

Ví dụ

/ko/reference/docker

Ví dụ yêu cầu

Tell me which app route this URL path maps to.

Yêu cầu web

Query string

Query string

?page=1&lang=ko

Ý nghĩa

The part of a URL after ? that passes extra parameters.

Khi dùng

Use it for filters, page numbers, search terms, and lightweight options.

Ví dụ

?page=1&lang=ko

Ví dụ yêu cầu

Explain what query parameters this URL sends.

Yêu cầu web

HTTP

HTTP

http://localhost:3000

Ý nghĩa

The basic protocol browsers and servers use for web requests and responses.

Khi dùng

Local development often uses HTTP before production HTTPS is configured.

Ví dụ

http://localhost:3000

Ví dụ yêu cầu

Explain whether this local URL uses HTTP or HTTPS.

Yêu cầu web

HTTPS

HTTPS

https://example.com

Ý nghĩa

HTTP protected by TLS encryption.

Khi dùng

Use HTTPS for public sites, login, cookies, payments, APIs, and production traffic.

Ví dụ

https://example.com

Ví dụ yêu cầu

Explain whether this deployed site needs HTTPS.

Yêu cầu web

HTTP method

HTTP method

GET /api/tools

Ý nghĩa

A verb that tells the server what kind of action the request wants.

Khi dùng

GET usually reads data, while POST usually creates or submits data.

Ví dụ

GET /api/tools

Ví dụ yêu cầu

Explain which HTTP method this API request should use.

Yêu cầu web

Status code

Status code

200 OK / 404 Not Found / 500 Internal Server Error

Ý nghĩa

A number that summarizes the result of an HTTP response.

Khi dùng

Use it to quickly separate success, redirect, client error, and server error responses.

Ví dụ

200 OK / 404 Not Found / 500 Internal Server Error

Ví dụ yêu cầu

Explain what this HTTP status code means.

Yêu cầu web

Header

Header

Content-Type: application/json

Ý nghĩa

Metadata sent with an HTTP request or response.

Khi dùng

Headers carry content type, authorization, cookies, cache rules, and CORS settings.

Ví dụ

Content-Type: application/json

Ví dụ yêu cầu

Explain the important headers in this response.

Yêu cầu web

Body

Body

{"name":"demo"}

Ý nghĩa

The main data content sent in an HTTP request or response.

Khi dùng

POST and PUT requests often send JSON data in the body.

Ví dụ

{"name":"demo"}

Ví dụ yêu cầu

Explain what data this request body sends.

Bảo mật trình duyệt

Origin

Origin

http://192.168.1.25:3000

Ý nghĩa

The combination of protocol, host, and port.

Khi dùng

Use origin to reason about CORS, cookies, and browser security rules.

Lưu ý

Changing only the port creates a different origin.

Ví dụ

http://192.168.1.25:3000

Ví dụ yêu cầu

Identify the origin of this URL.

Bảo mật trình duyệt

Same-origin policy

Same-origin policy

https://app.example.com cannot freely read https://api.example.com

Ý nghĩa

A browser rule that restricts how pages can read data from other origins.

Khi dùng

Use it to understand why browser API requests can fail even when the server is reachable.

Ví dụ

https://app.example.com cannot freely read https://api.example.com

Ví dụ yêu cầu

Explain whether this is a same-origin policy problem.

Bảo mật trình duyệt

CORS

CORS

Access-Control-Allow-Origin: https://app.example.com

Ý nghĩa

A server-side permission system that lets browsers use responses from another origin.

Khi dùng

Use it when a frontend app calls an API hosted on a different origin.

Lưu ý

CORS must be allowed by the server that sends the response.

Ví dụ

Access-Control-Allow-Origin: https://app.example.com

Ví dụ yêu cầu

Tell me whether this CORS error should be fixed in frontend code or server settings.

Bảo mật trình duyệt

Cookie

Cookie

Set-Cookie: session=abc; HttpOnly

Ý nghĩa

Small data stored by the browser and sent back to matching sites.

Khi dùng

Cookies are often used for sessions, preferences, and authentication state.

Ví dụ

Set-Cookie: session=abc; HttpOnly

Ví dụ yêu cầu

Explain whether this login state is stored in a cookie.

Bảo mật trình duyệt

Session

Session

session_id=abc123

Ý nghĩa

A way to remember user state across multiple requests.

Khi dùng

Use sessions to maintain login state or temporary server-side user data.

Ví dụ

session_id=abc123

Ví dụ yêu cầu

Explain how this app keeps the user session.

Bảo mật trình duyệt

Token

Token

Authorization: Bearer <token>

Ý nghĩa

A string used to prove identity or permission.

Khi dùng

Use tokens for API authentication, temporary access, and service-to-service requests.

Lưu ý

Tokens can grant access, so they should not be exposed in public code or logs.

Ví dụ

Authorization: Bearer <token>

Ví dụ yêu cầu

Check whether this token is being exposed to the browser.

Bảo mật trình duyệt

TLS certificate

TLS certificate

Let's Encrypt certificate

Ý nghĩa

A certificate used by HTTPS to prove a site's identity and encrypt traffic.

Khi dùng

Use it when serving a production site over HTTPS.

Ví dụ

Let's Encrypt certificate

Ví dụ yêu cầu

Explain why this browser says the certificate is invalid.

Phát triển cục bộ

Local network

Local network

Laptop and phone on the same Wi-Fi

Ý nghĩa

A private network where nearby devices can communicate, such as the same Wi-Fi.

Khi dùng

Use it when testing a local dev server from a phone or tablet.

Ví dụ

Laptop and phone on the same Wi-Fi

Ví dụ yêu cầu

Explain whether these devices are on the same local network.

Phát triển cục bộ

LAN IP

LAN IP

192.168.1.25

Ý nghĩa

An IP address used inside a local network.

Khi dùng

Use it from another device on the same network to reach your development machine.

Ví dụ

192.168.1.25

Ví dụ yêu cầu

Tell me the difference between localhost and a LAN IP.

Phát triển cục bộ

Network URL

Network URL

http://192.168.1.25:3000

Ý nghĩa

A URL that another device on the same network can use to reach a local server.

Khi dùng

Use it when testing a responsive page on a phone or tablet.

Lưu ý

The dev server may also need to listen on 0.0.0.0 and allow the origin.

Ví dụ

http://192.168.1.25:3000

Ví dụ yêu cầu

Explain how to open this dev server from a phone.

Phát triển cục bộ

Dev server

Dev server

npm run dev

Ý nghĩa

A local server used while developing and testing an app.

Khi dùng

Use it for fast reloads, local previews, and debugging before production build.

Ví dụ

npm run dev

Ví dụ yêu cầu

Explain which local URL and network URL this dev server exposes.

Phát triển cục bộ

HMR

HMR

/_next/webpack-hmr

Ý nghĩa

A development feature that updates the browser when code changes.

Khi dùng

Use it to keep the browser state while editing UI code.

Ví dụ

/_next/webpack-hmr

Ví dụ yêu cầu

Explain whether this blocked request is related to HMR.

Server và Docker

Proxy

Proxy

Browser -> proxy -> API

Ý nghĩa

A server that sends requests on behalf of a client.

Khi dùng

Use it to route requests, hide backend details, or avoid direct browser-to-API calls in development.

Ví dụ

Browser -> proxy -> API

Ví dụ yêu cầu

Explain whether this API request goes through a proxy.

Server và Docker

Reverse proxy

Reverse proxy

Nginx -> app:3000

Ý nghĩa

A server that receives public traffic and forwards it to internal services.

Khi dùng

Use it for HTTPS termination, routing, compression, caching, and forwarding to app servers.

Ví dụ

Nginx -> app:3000

Ví dụ yêu cầu

Explain how this reverse proxy routes traffic to the app.

Server và Docker

Docker port mapping

Docker port mapping

3000:3000

Ý nghĩa

A mapping from a host port to a container port.

Khi dùng

Use it so a browser on the host can reach a web app running inside a container.

Lưu ý

In Docker ports, the left side is the host port and the right side is the container port.

Ví dụ

3000:3000

Ví dụ yêu cầu

Explain the browser URL for this Docker port mapping.

Server và Docker

host.docker.internal

host.docker.internal

http://host.docker.internal:3000

Ý nghĩa

A special hostname containers can use to reach the host machine in many Docker Desktop setups.

Khi dùng

Use it when a container must call a service running on the host machine.

Ví dụ

http://host.docker.internal:3000

Ví dụ yêu cầu

Explain whether this container should use host.docker.internal.

Server và Docker

Service name

Service name

postgres://db:5432/app

Ý nghĩa

In Docker Compose, services can often reach each other by service name.

Khi dùng

Use db, api, redis, or other compose service names instead of localhost between containers.

Ví dụ

postgres://db:5432/app

Ví dụ yêu cầu

Explain why this container should use the db service name instead of localhost.

Server và Docker

Load balancer

Load balancer

Client -> load balancer -> app servers

Ý nghĩa

A system that distributes incoming traffic across multiple servers.

Khi dùng

Use it when one app has multiple running instances for scale or reliability.

Ví dụ

Client -> load balancer -> app servers

Ví dụ yêu cầu

Explain where a load balancer fits in this deployment.

Server và Docker

CDN

CDN

Static assets served from an edge cache

Ý nghĩa

A distributed network that serves content from locations closer to users.

Khi dùng

Use it to speed up static assets, images, scripts, styles, and cached pages.

Ví dụ

Static assets served from an edge cache

Ví dụ yêu cầu

Explain whether this static site benefits from a CDN.

Server và Docker

Cache

Cache

Cache-Control: max-age=3600

Ý nghĩa

Saved data or responses reused to make future requests faster.

Khi dùng

Use cache for static files, API responses, pages, and CDN edge content.

Lưu ý

Old cached content can make a fixed bug appear unfixed.

Ví dụ

Cache-Control: max-age=3600

Ví dụ yêu cầu

Explain whether this issue could be caused by cache.