NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲Double Buffering with Cloudflare Queues (bellone.com)
b_llc 3 days ago [-]
A stateless pattern I use to batch telemetry at the edge while driving Cloudflare write costs to zero.
fwlr 1 hours ago [-]
Cool pattern. Critics will say “falsehoods programmers believe about time” but it’s a cloud service, any time oddity that would break this would also break a lot more important stuff, so it’s fine.

Ugly code though.

  // env
  QUEUES = [EVEN_QUEUE, ODD_QUEUE]

  // producers
  env.QUEUES[hour % 2].send …

  // consumer
  env.QUEUES[1 + hour % 2]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 04:52:28 GMT+0000 (Coordinated Universal Time) with Vercel.