Как спроектировать CDN на Go?

Senior
105 просмотров
AFK Offer AI

Edge серверы: HTTP reverse proxy с кешем (LRU на диске). Origin shield — промежуточный кеш. Роутинг: DNS-based (GeoDNS) или anycast. Cache invalidation: purge API, TTL, stale-while-revalidate. Go: net/http reverse proxy, горутины для prefetch, consistent hashing для cache sharding. Метрики: hit ratio, latency P99, bandwidth.

Следующий вопрос

Что выведет: m := map[bool]string{true: "yes", false: "no"}; fmt.Println(m[1 > 0])?