0

I am reading Site Reliability Engineering, a book about how Google manages its software infrastructure. There is a section in chapter 2, where the life of a request to a Google service is described. The main points are:

[...] first, the user points their browser to shakespeare.google.com. To obtain the corresponding IP address, the user’s device resolves the address with its DNS server (1).

[...] The browser connects to the HTTP server on [the resolved] IP. This server (named the Google Frontend, or GFE) is a reverse proxy that terminates the TCP connection (2). The GFE looks up which service is required [...] and sends that server an RPC containing the HTTP request (3).

[...] The backend hands a protobuf containing the results to the Shakespeare frontend server, which assembles the HTML and returns the answer to the user.

Here is a diagram of the process: The life of a request at Google

I am confused about the part, where the reverse proxy terminates the TCP connection. If the TCP connection is terminated, how can a response be sent back to the client at all? The text says that the frontend server (in the picture named Application Frontend) returns the response to the user. How can this be, since the frontend server has no open connection with the client? Maybe I misunderstood and the author wanted to say that the reverse proxy terminates the TCP connection after it writes the response of the frontend server to the client? This explanation would fit with the definition of a reverse proxy.

TL;DR: Can someone explain how the response gets to the client?

lmazgon
  • 103
  • 3

1 Answers1

2

'Terminate' in this case is where the client request is received and forwarded to the application front end. The application returns its response, which is then sent as the response to the client, so it's correct to say that the query from your browser only reaches GFE in your diagram as the TCP packets are rewritten to pass into Google's network, being directed to the requested application.

Simon Greenwood
  • 1,343
  • 9
  • 12
  • After researching a bit I think I misunderstood the word "terminate" in this context. I guess my question boils down to: _does **terminate** mean **close**, as in "the reverse proxy **closes** the TCP connection"?_ (That's how I understood it) – lmazgon Dec 10 '17 at 20:01
  • No, it doesn't. Terminate in this case is closer to, say, the end of a journey for which there is a return trip. – Simon Greenwood Dec 11 '17 at 09:34