-2

I had a look at the Stack Exchange Servers:

https://meta.stackexchange.com/questions/10369/which-tools-and-technologies-are-used-to-build-the-stack-exchange-network

Seems they only have two data centres with 11 servers. There's no mention of CDN, which I presume is not possible since they are using server side html rendering (ASP.Net).

Yet, I feel like they are as fast as google (which has a gazillion servers). How is this possible?

user1034912
  • 1,345
  • 3
  • 14
  • 20
  • 2
    I see IP addresses owned by Fastly, I'm not sure the premise of the question is valid – Håkan Lindqvist Mar 26 '21 at 09:20
  • Meta link states they use CloudFlare somewhere, which is in fact are reverse caching proxy + CDN. But actually seems like they indeed use Fastly now, seems like this answer on Meta are outdated. – NStorm Mar 26 '21 at 09:51
  • The premise of the question shows zero effort and is fundamentally flawed as they do use a CDN. Someone needs to learn basics. – TomTom Mar 26 '21 at 17:28

3 Answers3

1

They do use CDN. It's at the moment Fastly: https://www.fastly.com/network-map.

d.c.
  • 257
  • 1
  • 2
  • 8
1

Read Nick's blog series Stack Overflow: A Technical Deconstruction. Stack Exchange is a traditional architecture of a few racks of on premise servers behind a CDN. As said several times in that series, "performance is a feature", a fanatical focus of operations on being fast. Most requests hit a global CDN. Web servers requests are probably cached in memory - caching dynamic content is absolutely possible. Actual database hits are optimized to the point where they wrote custom ORM software. Even the slow path from halfway around the world can seem pleasantly fast when performance is a feature.

Although they both employ speed focused people, Google and Stack Exchange's scale is wildly different. Google tries to index all information ever, and rent out enough compute to be one of the largest clouds. Stack Exchange is a few TB of popular Q&A information. SE definitely punches above its weight in terms of search engine influence and my personal preference. Partly due to being fast, partly due to growing communities that actually answer questions.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34
0

You can see their varnish cache headers with fastly:

$ curl -sSIL stackoverflow.com
HTTP/1.1 301 Moved Permanently
cache-control: no-cache, no-store, must-revalidate
location: https://stackoverflow.com/
server: Microsoft-IIS/10.0
x-flags: AA
x-aspnet-duration-ms: 0
x-request-guid: 6fa7e0c9-dfcb-4bf7-95fc-a7d6b6a0b29b
x-is-crawler: 1
x-providence-cookie: 942d24a0-db65-949e-1ef6-25b4bd2e0927
feature-policy: microphone 'none'; speaker 'none'
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
Accept-Ranges: bytes
Date: Fri, 26 Mar 2021 15:39:52 GMT
Via: 1.1 varnish
Connection: keep-alive
X-Served-By: cache-ams21076-AMS
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1616773192.208295,VS0,VE76
Vary: Fastly-SSL
X-DNS-Prefetch-Control: off
Set-Cookie: prov=942d24a0-db65-949e-1ef6-25b4bd2e0927; domain=.stackoverflow.com; expires=Fri, 01-Jan-2055 00:00:00 GMT; path=/; HttpOnly

HTTP/2 200
cache-control: private
content-type: text/html; charset=utf-8
server: Microsoft-IIS/10.0
strict-transport-security: max-age=15552000
x-route-name: Home/Index
x-frame-options: SAMEORIGIN
x-flags: AA
x-aspnet-duration-ms: 3
x-request-guid: 6dea1d9b-ee1c-46f0-9d8b-042cf588aa45
x-is-crawler: 1
x-providence-cookie: ce7f511e-4a12-023f-eef8-28f1d2742f65
feature-policy: microphone 'none'; speaker 'none'
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-page-view: 1
accept-ranges: bytes
date: Fri, 26 Mar 2021 15:39:52 GMT
via: 1.1 varnish
x-served-by: cache-ams21050-AMS
x-cache: MISS
x-cache-hits: 0
x-timer: S1616773192.383164,VS0,VE79
vary: Fastly-SSL
x-dns-prefetch-control: off
set-cookie: prov=ce7f511e-4a12-023f-eef8-28f1d2742f65; domain=.stackoverflow.com; expires=Fri, 01-Jan-2055 00:00:00 GMT; path=/; HttpOnly
Marcel
  • 1,730
  • 10
  • 15