Hi
my server is a strong VPS with cloudflare (free).
sometimes when we have a peak in visits, the server of our payment gateway cannot reach our server to notify payment was done. result is orders that appear “canceled” on our part, are actually paid by customer, only to wait a week and send us an email ‘where is my stuff i ordered’.
is there a way to give priority to incoming connection from certain IPs?
thanks!
Unfortunately, Cloudflare can not prioritize traffic. Is there a way to configure your payment gateway so it knows the direct IP address of your server?
if they do use the direct IP address, the traffic will go through 100% ?
what’s the difference technically?
I don’t know what your specific setup is, but the only way to give a payment processor a head start is if they get a direct connection to your server.
But it really sounds like your server is overloaded and not accepting connections. And, unfortunately, the system you have in place is not very fault tolerant.
I don’t think the problem is being too overcrowded. the server is MASSIVE and i believe that the traffic is marked as sus and throttled. i will try whitelisting in CF’s firewall.
There’s probably a few things you can do here.
Let’s say your notify payment url is /shop/paypal/notifications [POST] you can use a cloudflare javascript worker installed on that path to retry the request when the response is a timeout or 50x status code, with say max 10 attempts with a delay of 1sec + (0.1 * pow(attempts, 2)) between each.
However every payment provider I’ve ever worked with will retry notifications as long as your not swallowing exceptions * and returning a 200 status code - think some horrid magento plugins did this at one point.
Chat to your developer about something like the above approach, or upwork the worker task, it’s a small job
Additionally, for the URI path of the postback notification you can also add a firewall rule just for that URI path that disables things that might interfer with the request, yielding a 400 or 429 or other
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.