Skip to content

Tags

#backend

Posts tagged #backend on Dynamo Geeks: 38 posts from the community, most useful first.

38 posts

Posts tagged #backend

  1. Experience

    Our worst week this year: a queue job that charged one customer three times

    I post the wins here, so I should post this one too. UK ecommerce client, Laravel, a payment gateway the client chose (a smaller provider, not Stripe). Checkout puts a ChargeOrder job on the queue. The job had $tries = 3 with backoff, because "network errors happen". One evening the gateway was slow. The charge request took longer than our HTTP timeout, so the job threw a timeout exception. Laravel did exactly what…

    Ayesha Siddiqui25likes11comments

  2. Experience

    Blameless review: the 'quick' migration that blocked every write to our orders table

    Short incident review, because the lesson is more useful than the embarrassment. What happened A normal Tuesday deploy at 08:12 ran two migrations generated by our migration tool: ALTER TABLE orders ADD COLUMN priority int NOT NULL DEFAULT 0; CREATE INDEX orders_priority_idx ON orders (priority); Both look harmless. Since Postgres 11, adding a column with a constant default does not rewrite the table, so the ALTER…

    Bram Verhoeven19likes9comments

  3. Article

    Going from CRUD backend to payments: things I wish someone told me

    4 years back I was writing CRUD APIs for a food delivery startup. Then I joined a lending company, and in the first month I broke a reconciliation job, learned what a UTR is, and realised I did not know what a debit was. Writing this for anyone thinking about moving into fintech backend. Learn basic accounting before anything else. Not the full course. Just double entry, what assets and liabilities are, and why a…

    Arjun Mehta4likes3comments

  4. Question

    Go + Postgres: ¿pgx directo o database/sql? (y cómo manejan el pool)

    Parce, sigo aprendiendo Go con tincho (gracias maestro) y ya estoy pasando un servicio pequeño de Node a Go. Tengo dudas con Postgres: ¿Usan pgx directo ( pgxpool ) o database/sql con el driver pgx/v5/stdlib ? Leí que pgx directo es más rápido pero no sé si vale la pena. ¿Cuántas conexiones ponen en el pool? En Node tenía max: 10 en pg y no sé si en Go es igual. ¿sqlc o escribir las queries a mano? El servicio es…

    Camilo Restrepo5likes6comments

  5. Experience

    Our reconciliation job was wrong every day for a week because London changed its clocks

    Story from March that I promised a few people. Clocks go back again on the 25th, so this is the right week. I work from Enugu for a London fintech. Nigeria is UTC+1 all year, no daylight saving. London is UTC+0 in winter and UTC+1 in summer. Our partner bank sends a settlement file per "London business day", midnight to midnight London time. Our reconciliation job builds the same window on our side and matches…

    Emeka Nwosu21likes8comments

  6. Question

    Laravel queue jobs do baar run ho rahi hain (jobs running twice), retry_after ka kya chakkar hai?

    Aadab sab ko. School management software mein ek job hai jo ek school ke saare students ki fee receipt PDF banake parents ko email karti hai. Masla ye hai ki kabhi kabhi job do baar chal jaati hai, parents ko do emails jaate hain, aur principal sahab naraz hain. Setup: Laravel 11, PHP 8.3, QUEUE_CONNECTION=redis , worker: php artisan queue:work --tries=3 class SendFeeReceipts implements ShouldQueue { use Queueable;…

    Faizan Qureshi5likes9comments

  7. Article

    Payment webhooks arrive twice, out of order, and sometimes never. Design for all three

    Every payment gateway webhook doc says some version of "we may send the same event more than once". What they say less loudly: events can arrive out of order, and sometimes they dont arrive at all. Our first webhook handler assumed none of this. Here is the version that survived. 1. Twice: store the event id Every event has an id. Insert it into a processed_events table with a unique constraint before doing anything…

    Arjun Mehta8likes5comments

  8. Question

    Payout worker queue in Postgres: SKIP LOCKED is holding transactions open for 30s, better way?

    We have a payouts table and 4 worker processes that pick pending payouts and call the bank API. Right now each worker does this: begin; select * from payouts where status = 'pending' order by created_at limit 10 for update skip locked; -- call bank API for each row (can take up to 30s) update payouts set status = 'sent' where id = ...; commit; It works, no double picks. But the transaction stays open during the HTTP…

    Arjun Mehta3likes3comments

  9. Article

    System design primer: design a rate limiter, with real numbers

    Most rate limiter answers I hear in mocks are one box on a diagram labelled "rate limiter" and then the candidate moves on. That box is the whole question. Let us do it properly, with numbers. Thanks to Kenji for reviewing the draft. 1. Requirements (spend 5 minutes here) Public API behind a gateway. 10 million daily active users. Limit: 100 requests per user per minute. Some endpoints (login, OTP) much stricter.…

    Nikhil Sharan64likes17comments

  10. Question

    Anyone running Laravel Octane on FrankenPHP in production? Memory and singleton horror stories wanted

    We are moving one high traffic client API (about 4M requests a day, mostly reads, Redis cached) from php-fpm to Octane with FrankenPHP. Staging benchmarks look great, p95 from 48ms to 14ms. But I have done this long enough to know staging lies. Setup: PHP 8.3, Laravel 11, Docker, 2 containers behind a load balancer. Questions for people who actually run it in production: Memory growth: do you set --max-requests ,…

    Ayesha Siddiqui5likes7comments

  11. Experience

    A pentester found an IDOR in our statements API in 10 minutes. The fix was boring

    Last quarter an external pentest found that any logged-in customer could download any other customer's account statement. It took the tester around 10 minutes. I want to share it because the bug was very ordinary, and ordinary bugs are the ones that survive reviews. The endpoint was GET /api/statements/{id} . It checked that the request had a valid session. It did not check that the statement belonged to the…

    Fatima Al-Sayed4likes3comments

  12. Article

    PHP in 2026 is actually good. Here are my receipts.

    Every few weeks somebody in a thread here tells me PHP is dead. I run an 11 person agency in Karachi. This month PHP paid 11 salaries, our office rent, two laptops and a very expensive coffee machine. If this is death, it is a well paid one. But "it pays" is not an argument about quality, so here are actual receipts. And at the end, what is still bad, because I am not a fan club. Receipt 1: the language grew up PHP…

    Ayesha Siddiqui76likes39comments

  13. Article

    Spring Boot 2.7 to 3.3 on a European bank project: what actually broke (it was not just javax)

    Our client, a mid-size bank in Europe, got a finding from their security team: Spring Boot 2.7, open source support ended in November 2023, upgrade. So our team of 7 in Pune got the job. 41 Maven modules, Oracle database, a partner integration in Frankfurt, and a change advisory board that meets once a week. Here is what broke, in the order we found it. 0. Java 17 first, separately Boot 3 needs Java 17. We moved…

    Omkar Joshi27likes11comments

  14. Experience

    The Friday deploy a power cut saved (and the idempotency key that saved us the next time)

    Howzit. Two stories, one lesson, and the lesson is not "don't deploy on Friday", sorry. Story one A few years back, Friday 16:30, I'm about to push a change to how we retry failed card authorisations. Tests green, reviewer happy, I'm feeling lekker. I type the command and the power goes. Whole block. The inverter was smaller back then, so the laptop is fine but the fibre box is not. No internet, no deploy. I sulked,…

    Lindiwe Mokoena23likes9comments

  15. Article

    Kotlin coroutines in a Spring service: three leaks we shipped and what structured concurrency fixed

    We run our routing service in Kotlin on Spring Boot. Coroutines were introduced two years ago by enthusiastic people, including me. Here are the three mistakes we made, all of them explained in the kotlinx.coroutines docs, which none of us had read properly. Hence the topic. 1. GlobalScope for fire-and-forget fun ship(order: Order) { GlobalScope.launch { auditClient.record(order.id, "shipped") }…

    Bram Verhoeven22likes9comments

  16. Article

    the borrow checker, explained to my ruby self

    i wrote ruby for five years before rust. in ruby every variable is a reference to an object somewhere, the garbage collector cleans up after you, and you never think about who "owns" anything. so my first month of rust was mostly me yelling at the compiler. here are the three errors i hit most, translated for past me. if you want the 100 second version of rust first, fireship's is honestly good: 1. E0382: the value…

    Mio Kobayashi27likes12comments

  17. Experience

    .NET Framework 4.8 to .NET 8 on a 14 year old insurance app: what actually broke

    Just rolled off a 9 month contract moving an insurer's claims system off .NET Framework. WebForms, WCF, EF6, 380k lines, written by at least four different consultancies judging by the naming conventions. Here's what actually broke, because the Microsoft docs make it sound like a weekend and it is not a weekend mate. 1. WebForms does not exist in .NET 8. Full stop. There is no upgrade path for .aspx pages. You…

    Gary Pritchard30likes9comments

  18. Experience

    Norway became false

    Config had a list of Nordic country codes for a region filter. FI, SE, DK, NO, IS. Service read it with PyYAML. Norway was missing from the filter. countries: - FI - SE - DK - NO - IS PyYAML follows YAML 1.1, where NO , no , off , yes and friends are booleans. Python got ['FI', 'SE', 'DK', False, 'IS'] . Filter compared strings. Norway silently gone. Two hours. Fix: countries: - "FI" - "SE" - "DK" - "NO" - "IS" Also…

    Jussi Laaksonen21likes9comments

  19. Experience

    Our settlement was off by ₹410 and it took three days to find why

    Partner bank sends us a settlement file every morning. We compare it with our ledger and the totals should match to the paisa. One Monday it was off by ₹410.37. Not a lot of money. But a mismatch is a mismatch and finance will not close the day with it. First day we checked the obvious things. Missing transactions, duplicates, refunds settled on a different day. Everything matched row by row on the transaction…

    Arjun Mehta3likes3comments

  20. Article

    context.Context en Go, explicado como se lo explicaría a un amigo en un asado

    Che, Camilo me preguntó el otro día "¿para qué sirve el ctx que todo el mundo pasa como primer parámetro?" y le contesté con un audio de 7 minutos. Lo paso a texto para que le sirva a alguien más. Qué es, en una frase context.Context es un valor que viaja con tu request y lleva tres cosas: un deadline (hasta cuándo tenés tiempo), una señal de cancelación (che, pará, ya no hace falta) y algunos valores del request…

    Martín Ferraro8likes7comments

Get the best of Dynamo Geeks weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.