paivana

HTTP paywall reverse proxy
Log | Files | Refs | Submodules | README | LICENSE

NEWS (4823B)


      1 Unreleased:
      2   - The paywall's QR code comes from qrcode-generator 2.0.4, the maintained
      3     library by Kazuhiko Arase that the vendored qrcodejs 1.0.0 (unmaintained
      4     since 2015) was built on.  It is drawn as an inline SVG, so the page's
      5     Content-Security-Policy no longer allows data: images.
      6 
      7   - Payment confirmation retries an order-status GET once when the merchant
      8     connection fails before returning any HTTP response.  The retry stays
      9     within the original five-second deadline, preventing a stale pooled
     10     connection from intermittently turning a completed payment into error
     11     9801.  Merchant-related error JSON now includes `merchant_http_status',
     12     with zero meaning that no HTTP response was received.  When both attempts
     13     fail early, the sampled warning queues one bounded, forced-fresh request
     14     for the same order and logs its addresses, HTTP result, OS errno,
     15     connection count and DNS/TCP/TLS/first-byte timings.  This distinguishes a
     16     shared connection-pool failure from general backend reachability without
     17     logging the bearer token or response body.
     18 
     19   - MERCHANT_BACKEND_INTERNAL_URL may now select a private HTTP(S) route for
     20     Paivana's merchant API calls while MERCHANT_BACKEND_URL remains the public
     21     URL advertised to browsers and wallets.  In particular, a public HTTPS
     22     merchant can be reached through a cleartext MERCHANT_BACKEND_UNIX_PATH
     23     without attempting TLS over that socket or exposing an internal URL in the
     24     paywall.
     25 
     26   - High-load operation is now fail-fast and bounded.  CONNECTION_LIMIT
     27     defaults to 384 and may not exceed the select()-safe descriptor budget;
     28     PAYMENT_CONNECTION_LIMIT reserves 32 request slots for redemptions, and
     29     RELAY_MEMORY_LIMIT validates aggregate streaming-ring memory.  Unsafe
     30     descriptor, RLIMIT_NOFILE and memory combinations are startup errors.
     31 
     32   - SIGTERM quiesces listeners and drains accepted requests for
     33     SHUTDOWN_GRACE_PERIOD (60 s by default).  Template discovery, concurrent
     34     detail fetches, retained Paivana templates, contract size, installed
     35     languages and the process-wide rendered-response cache now have documented
     36     bounds.  Repeated merchant transport diagnostics are sampled once per
     37     minute per failure class with a recovery summary.
     38 
     39   - The reverse proxy streams both directions.  A request or response
     40     body is relayed as it arrives instead of being assembled in memory
     41     first, so its size is no longer bounded by memory -- previously
     42     anything over 40 MiB was refused outright with 502, and the client
     43     could not receive a single byte until the origin had sent the last
     44     one.  The origin's framing now reaches the client unchanged as
     45     well: a declared Content-Length stays declared and a chunked
     46     response stays chunked, where before both were recomputed from the
     47     assembled buffer.  A HEAD accordingly reports the length the
     48     equivalent GET would have had, rather than 0.
     49 
     50   - Configuration: REQUEST_BUFFER_MAX (and its -u/--max-upload flag)
     51     now sizes the buffer a request body is relayed through, 256 KiB by
     52     default, and no longer decides how large an upload may be.  That is
     53     MAX_REQUEST_SIZE, new, 1 MiB by default.  RESPONSE_BUFFER_MAX is
     54     the mirror of the first; there is deliberately no mirror of the
     55     second, since removing the limit on a response is the point of the
     56     change.
     57 
     58     UPGRADING: a configuration that set REQUEST_BUFFER_MAX (or -u) to
     59     permit large uploads meant the limit, so where it is set and
     60     MAX_REQUEST_SIZE is not, MAX_REQUEST_SIZE takes its value.  Such a
     61     configuration therefore keeps behaving as it did, at the cost of a
     62     correspondingly large relay buffer; set both explicitly to separate
     63     them.
     64 
     65   - Timeouts: UPSTREAM_TIMEOUT (60 s) now bounds the time to the
     66     response *headers* rather than to the whole transfer, since a large
     67     download legitimately runs for longer than any useful ceiling.  A
     68     stalled transfer is bounded instead by the new
     69     UPSTREAM_STALL_TIMEOUT (60 s), which is how long the origin may
     70     move no bytes in either direction, and which does not run while
     71     paivana is holding the origin back because the client has not
     72     caught up.
     73 
     74   - An origin that fails after its response headers have gone out can
     75     no longer be reported as 502: the status is already on the wire.
     76     It is reported as a framing error instead -- a declared
     77     Content-Length that is not met, or a chunked response closed
     78     without its terminating chunk -- which RFC 9112 section 8.1.2
     79     requires a client to treat as a failure.  The exception is an
     80     HTTP/1.0 client receiving a response of unknown length, where the
     81     close is the framing and truncation cannot be signalled.
     82 
     83   - Requires GNUnet 0.29.0 for GNUNET_CURL_job_add_stream().