Both Fastly and Cloudflare are “new” or “modern” CDNs which operate as a reverse proxy.
Fastly is focused purely on CDN (i.e. performance features) as well as delivering video.
Cloudflare is a security and performance service, providing DDoS protection, WAF, and CDN.
Cloudflare does not offer any video delivery. Fastly does not offer DNS services. Cloudflare is one of the world’s largest DNS providers.
Fastly charges based on usage and Cloudflare is flat-rate.
Fastly is built on Varnish and Cloudflare is built on Nginx. (in both cases, highly customized)