BrianJM
CDCloudflare Developers
•Created by konga on 4/9/2024 in #pages-discussions
Build configuration · Cloudflare Pages d...
I didn't notice you're using
process.env
until now. Different problem.5 replies
CDCloudflare Developers
•Created by konga on 4/9/2024 in #pages-discussions
Build configuration · Cloudflare Pages d...
Same problem. Did you find an answer @konga
5 replies
Reducing COGS of our service
Have you looked into tuning Postgres? https://www.postgresql.org/docs/current/runtime-config-resource.html
21 replies
Sleeping service not waking in response to POST on internal network
@Mig If I understand correctly, this would work for me. I believe this is similar to my previous idea (I didn't test yet) with HAProxy load balancing internal as primary and external as backup (to wake it up).
39 replies
Sleeping service not waking in response to POST on internal network
Tha is for the feedback. I can probably test out the HAProxy idea next week and create a template (if viable).
No need to apologize regarding the rollout information. I just noticed it didn't seem to wake (internal network) so I disabled it.
I tried on a public app (I only use) and noticed the app does not sleep as often as I expected, and wakes unexpectedly. I think this may be due to bots scanning domains with LE certificates (this data is publicly accessible).
39 replies
Get client IP
Thoughts on what luna mentioned? Perhaps it would accumulate through multiple proxy
envoy
layers?
It is a common case where a service wants to perform analytics based on the origin client’s IP address. Per the lengthy discussion on XFF, this can get quite complicated, so Envoy simplifies this by settingx-envoy-external-address
to the trusted client address if the request is from an external client.x-envoy-external-address
is not set or overwritten for internal requests. This header can be safely forwarded between internal services for analytics purposes without having to deal with the complexities of XFF.
29 replies
Sleeping service not waking in response to POST on internal network
Are there known workarounds? I did not realize this until now (and it explains some things I observed).
I have an idea. Place HAProxy layer between as a load balancer, with one public and one private domain as the backend, and set the load balancing so that the public domain is the backup.
That would first attempt to use the private network, and fallback to public. Once the app wakes, the private network would be used.
HAproxy uses almost no CPU and negligible RAM. This would probably cost around $1/mo, maybe less.
39 replies
Get client IP
I believe
X-Envoy-External-Address
is also going to give you the real client IP. I assume this comes from the Railway edge gateway / load balancer.
You can pass that through to your app and it will persist through multiple proxies. This may not be an issue for you but it can be treated as a custom header.29 replies
Hobby Plan
Do the services need to be always on?
I'm not familiar with Spring Boot but, in my experience, Java tends to use and require more RAM, so pausing that layer may save a lot. Postgres has lower RAM usage when idle than MySQL, so that's good.
11 replies
Slow performance for Pro Plan
How many SQL queries are executed in the GET request? Latency with DB connections can have significant impacts depending on the app.
Take WordPress for example. Add 100ms latency to the DB layer and 500ms FTTB will become 10s pretty quickly. (WordPress executes 100-300 SQL queries per request.)
16 replies