SShortSingh.
Back to feed

Image Thumbnail Timeouts Before Storage Upload in Node.js: Splitting the Pipeline

0
·1 views

A Node.js marketplace issue shows thumbnail requests timing out before reaching object storage, which the author attributes to multiple timing stages sharing one deadline. The piece argues resizing should be a bounded worker step separate from upload, with private derivatives written under tenant-scoped keys. It compares Amazon S3, Cloudflare R2, Google Cloud Storage, and Infrai on fit and trade-offs, emphasizing that the application, not the storage provider, should control tenant read access. The author recommends measuring queue wait, decode, encode, and upload durations separately, logging per derivative rather than per request, and enforcing a finite derivative plan with input caps.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Mithril.js: A Under-10 KB Framework Bundling Components, Routing and HTTP

Mithril.js is a JavaScript framework under 10 KB gzipped that includes components, routing, and HTTP requests in a single small file. Its core design uses components with view functions that return virtual DOM, with m.redraw() refreshing the page when state changes. The framework requires no build step, JSX, or additional tooling. It suits small apps, dashboards, and embedded widgets, though its smaller community means fewer tutorials, components, and developers available for hire compared with React or Vue.

0
ProgrammingDEV Community ·

Six Weeks of Brain Training Improved Only the Games Practised, Large Study Finds

A 2010 study by Adrian Owen's team at Cambridge's Medical Research Council, run with the BBC show Bang Goes the Theory, tracked 11,430 online volunteers. Participants trained for six weeks on tasks meant to build reasoning, memory, attention and planning, while a control group answered general-knowledge questions. Everyone improved on the games they practised, but the trained groups showed barely any gains on benchmark tests over the control group, with no evidence of transfer to untrained tasks. Later actions included a 2016 US Federal Trade Commission settlement with Lumosity over unsupported claims, and reviews by other researchers finding strong evidence only for near-task improvement. Similar patterns appeared in studies of chess, music and working-memory training once comparison groups were properly controlled.

0
ProgrammingDEV Community ·

Reconnect schedules can cause a thundering herd when a relay restarts

A device agent stacks two reconnect schedules: the socket library's own backoff and an outer loop in the agent's main process. A clamp in the library's backoff code pushes many jittered delays up to a fixed value, so devices can retry in lockstep. Devices whose session tokens have expired must also call the /init endpoint, where random 5 to 60 second waits are meant to spread load. The outer loop rebuilds the connection on a 60-second tick and backs off to 30 minutes after five rebuilds. The author notes they have not measured a real relay restart and makes no claim about its outcome.

0
ProgrammingDEV Community ·

SPF Flattening: Benefits, Risks and Safer Alternatives

SPF records are limited to 10 DNS lookups, and each include mechanism typically consumes at least one, often more. Flattening replaces include entries with the underlying IP addresses, which do not count toward the limit, so the record can fit under the threshold immediately. The approach has a drawback: if a service changes its sending addresses, the copied list becomes outdated and legitimate mail can fail SPF without any warning. Recommended alternatives include removing unused services, moving bulk senders to a dedicated subdomain with its own SPF record, and relying on DKIM where supported. If flattening is still necessary, the article advises using a service that updates addresses automatically and monitoring DMARC reports.