Kuba Faraway
Explore posts from serversCDCloudflare Developers
•Created by Kuba Faraway on 6/18/2024 in #general-help
Cloudflare selects distant CDN
To begin with, I would like to thank all the kind souls who offer their time and help.
I have small ecommerce store hosted on VPS located in Poland (paying yearly ~ 120 dollars). Currently selling mainly in Poland, but extending our boundries for whole Europe.
I would like to benefit from Cloudflare security and performance, but with performance there is a problem.
VPS Origin Server is in Olsztyn (175km from Warsaw, 390km from my location - Glogow).
When testing from my location (Glogow) cdn-cgi/trace shows colo=IAD. As far as I know IAD stands for Ashburn, US* ~ 7000km away. 😭
When testing from server location (Olsztyn) the cdn-cgi is for Warsaw, which is fine ~ 175km.
The question is: How do I fix it that cloudflare selects IAD location for my CDN? Below the results for requests from my location (Glogow). In future I wanted to buy Cache Reserve, but this won't reduce this delay. Right now I'm getting to know Cloudflare for around 4 days (as backend developer), using Free Version, probably paid subscription would solve the issue, but maybe not pro, not business just Enterprise? But who affords to pay atleast 20$ per month (or maybe 1000$), when my whole infrastructure costs 10$ monthly? I checked other 3 bigger companies from Poland, and I get connected to colo=FRA from them.
1. Request [DNS only] [from Glogow]
loading html doc ~ 90ms
loading image ~ 140ms
2. Request [DNS proxied] [from Glogow] (cache MISS for image)
loading html doc ~ 400ms
loading image ~ 760ms
3. Request [DNX proxied] [from Glogow] (cache HIT for image)
loading html doc ~ 390ms
loading image ~ 290ms
23 replies
KPCKevin Powell - Community
•Created by Kuba Faraway on 12/1/2023 in #front-end
Passing props in parent component
React I have two types of components:
- List
- option (component CheckboxOption or RadioOption could be used in props.children)
Now I want to use it in the app, how can I do it without repeating props? (Example is simplified, and in real scenario CheckboxOption could be also replaced with RadioOption etc...
page.tsx
3 replies
KPCKevin Powell - Community
•Created by Kuba Faraway on 11/30/2023 in #front-end
React passing props to children within parent component + TypeScript
Let's say I have Select component that manages state for event onChangeOption when option is checked/unchecked. Option can be component SimpleOption or CheckboxOption.
Select.tsx
SimpleOption.tsx
Page.tsx
Question
On page.tsx, I have to specify onChangeOption for SimpleOption [or CheckboxOption]. How can I avoid it without making onChangeOption optional? (it's required and I don't want to cheat it).
2 replies