css - Web 请求生命周期

标签 css html request

今天晚些时候我有一个面试,我可能会被问到的示例问题之一如下:

“描述对 http://mywebsite.com/jobs/edit/1 的请求从前端到中间/API 到后端的生命周期。每一步都需要什么样的软件架构?”

我对此不是很确定。有人可以帮助我并发布他们认为可以很好地回答此类问题的内容吗?谢谢。

最佳答案

我猜这个问题中的架构,软件是指。

    1. The IP of mywebsite.com is resolved by a DNS request. 
    2. The DNS request is answered by the DNS server.
    3. A TCP/IP connection is opened to *.*.*.* 
       A http get/post request is issued to the server via HTTP
    4a) A firewall is passed (if present), and the request is hopefully forwarded to the web-server
    4b) The web-server receives the request, 
    and based on it's virtual hosting configuration information and the information in the http-headers, will forward the request to the respective application 
    via FastCGI or using a Server-Module/ISAPI.'
    5. The web-application receives the request for http://mywebsite.com/jobs/edit/1
    6a) HTTP-modules are executed for this request (e.g. forms authentication, banning)
    6b) If the route is registered in the routing regex, the request is routed to the appropriate MVC controller (jobs)
    7. The edit action in the MVC controller is called with parameter 1
    8. The edit view is returned for parameter 1
    9. The client receives the HTML
    10. the port is closed by the client & server

    "Describe the lifecyle of a request to http://mywebsite.com/jobs/edit/1 from front-end to middle/API to backend. 
    What kind of software architecture would be needed at each step?"

    1. Requires DNS-client
    2. Requires DNS-Server
    3. Requires web-browser or TCP/IP/HTTP capable application
    4. Requires web-server that is virtual name based hosting capable
    5. Requires a web-application, like PHP/ASP.NET/Python/Perl
    6-8. Requires MVC application architecture
    9-10. Stateless architecture

关于css - Web 请求生命周期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25137254/

相关文章:

request - 如何避免使用 CORS 的节点请求包进行预检 OPTIONS 请求?

jQuery:选择器问题(破折号)

css - 适用于所有 figcaption 标签

jquery - 用 JS 添加一个 css 过渡,并同时更改作为过渡主题的属性,不起作用

html - 小屏幕的 View 重叠

javascript - 通过纵向/横向 View 显示不同的数据

javascript - 通过网页动态处理请求

html - 支持带代码验证的 HTML 和 CSS 的最佳免费 Windows IDE?

html - 悬停时如何使部分头部容器改变颜色

带正文的 Android Volley 请求