Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


A question about cloudflare.
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

A question about cloudflare.

rahulksrahulks Member
edited April 2014 in Help

i know when a website hosted on a VPS gets lot of hits , it will use lot of RAM.My question is if we are using Cloudflare, can the Ram usage be minimised?

«1

Comments

  • n1kkon1kko Member

    If you use any other DNS server that's not on your own server then yes it will reduce server load on memory and CPU. Cloudflare is an excellent choice

  • namhuynamhuy Member
    edited April 2014

    Cloudflare caching will reduce request for your vps which helps to reduce vps load.

  • MunMun Member

    Yes it would because there would be less spawned processes to handle the requests, but it more depends on how you are using the website (static content / dynamic) and what web server you are using (apache / nginx)

    It would be better to describe your website and how it functions and its goals.

    Mun

  • @Mun

    I use mybb forums
    and the webserver is apache2

  • Switching to a different webserver will help a lot more than cloudflare, Apache uses a stupid amount of ram.

  • I personally recommend nginx with php-fcgi, but lighttpd is also a good alternative.
    There are many guides on the internet about setting them up, so it should be fairly easy to switch

  • IshaqIshaq Member

    nginx reverse proxy + varnish cache with an Apache backend.

  • NomadNomad Member

    But then again if you get high traffic, php-fpm uses more cpu if there's no caching involved. Go for Cloudflare or Varnish

  • udkudk Member
    edited April 2014

    On the topic of cloudflare...

    Has anyone else noticed the free plans have gone to shit lately?

    Free plan:
    # ping 108.162.196.249 PING 108.162.196.249 (108.162.196.249) 56(84) bytes of data. 64 bytes from 108.162.196.249: icmp_req=1 ttl=51 time=116 ms 64 bytes from 108.162.196.249: icmp_req=2 ttl=51 time=128 ms 64 bytes from 108.162.196.249: icmp_req=3 ttl=51 time=120 ms 64 bytes from 108.162.196.249: icmp_req=4 ttl=51 time=115 ms

    Pro plan:
    # ping 162.159.247.116 PING 162.159.247.116 (162.159.247.116) 56(84) bytes of data. 64 bytes from 162.159.247.116: icmp_req=1 ttl=59 time=17.4 ms 64 bytes from 162.159.247.116: icmp_req=2 ttl=59 time=17.2 ms 64 bytes from 162.159.247.116: icmp_req=3 ttl=59 time=17.2 ms 64 bytes from 162.159.247.116: icmp_req=4 ttl=59 time=17.4 ms

    It's been bad for a couple weeks now, at least in europe. US/Asia doesn't seem affected. No, it's not just my home ISP with these issues.

    Thanked by 1linuxthefish
  • MunMun Member

    cloudflare will help lightly with your site. For all the people whom above suggested using nginx + php5-fpm I would recommend not. Apache is far better at doing PHP anyday then php5-fpm which will use more RAM then apache. The reason most people say they see a benefit of moving to nginx is because they have lots of static files on there site which is served better with nginx as it is built to be a fast static file server.

    I suggest Varnish or nginx reverse proxy if you want to build it yourself, or cloudflare if you don't want to, though the benefits of cloudflare may be minimal.

    Mun

  • @udk that's strange, both IPs route to Frankfurt for me. Maybe give us a traceroute so we can compare how it is from your end?

  • @udk said:
    On the topic of cloudflare...

    Has anyone else noticed the free plans have gone to shit lately?

    Free plan:
    # ping 108.162.196.249 PING 108.162.196.249 (108.162.196.249) 56(84) bytes of data. 64 bytes from 108.162.196.249: icmp_req=1 ttl=51 time=116 ms 64 bytes from 108.162.196.249: icmp_req=2 ttl=51 time=128 ms 64 bytes from 108.162.196.249: icmp_req=3 ttl=51 time=120 ms 64 bytes from 108.162.196.249: icmp_req=4 ttl=51 time=115 ms

    Pro plan:
    # ping 162.159.247.116 PING 162.159.247.116 (162.159.247.116) 56(84) bytes of data. 64 bytes from 162.159.247.116: icmp_req=1 ttl=59 time=17.4 ms 64 bytes from 162.159.247.116: icmp_req=2 ttl=59 time=17.2 ms 64 bytes from 162.159.247.116: icmp_req=3 ttl=59 time=17.2 ms 64 bytes from 162.159.247.116: icmp_req=4 ttl=59 time=17.4 ms

    It's been bad for a couple weeks now, at least in europe. US/Asia doesn't seem affected. No, it's not just my home ISP with these issues.

    I would contact there support team with that information they may not be aware of the performance differance

    @Mun said:
    cloudflare will help lightly with your site. For all the people whom above suggested using nginx + php5-fpm I would recommend not. Apache is far better at doing PHP anyday then php5-fpm which will use more RAM then apache. The reason most people say they see a benefit of moving to nginx is because they have lots of static files on there site which is served better with nginx as it is built to be a fast static file server.

    I suggest Varnish or nginx reverse proxy if you want to build it yourself, or cloudflare if you don't want to, though the benefits of cloudflare may be minimal.

    Mun

    So there are other reasons that nginx is great other then its config files are not xml but it is great with using async io which if you have lots of special rules for routing and blocking/rate limiting by ip addresses. FPM may use more memory but it also has really good contorl on when a worker should get killed

    rds100 said: that's strange, both IPs route to Frankfurt for me. Maybe give us a traceroute so we can compare how it is from your end?

    cloudflare uses anycast ips what that means is they can announce the same ip from multiple data centers for different routes on the internet. I am not sure if Frankfurt is close or far from you and if the route is the best but thats how it works.

  • CakeyCakey Member
    edited April 2014

    wojons said: I would contact there support team with that information they may not be aware of the performance differance

    They probably are and they are probably the ones that put it like that as well, as it is kinda free so to speak.
    I'm having the same results as udk between paid and free.

  • @Cakey said:

    I would still contact them because thats a pretty big differance in ping rate. Have you tried putting the same size static file on both domains and seeing what the latancy is once its been cached on there end?

    Zen said: The irony of someone trying to tell @rds100 about networking!

    am i not allowed to tell him about networking

    Zen said: wouldn't be surprised if that's an artificial increase in latency they set up.

    seems like a lot of work to get people to pay.

  • CakeyCakey Member

    wojons said: I would still contact them because thats a pretty big differance in ping rate. Have you tried putting the same size static file on both domains and seeing what the latancy is once its been cached on there end?

    Not really as all of our domains are currently on paid + business

  • @Cakey said:
    Not really as all of our domains are currently on paid + business

    So i am guessing ur not seeing the performance issue.

  • udkudk Member

    I realize the IPs are anycasted, just trying to show the difference between free and pro plans now (in Europe, haven't noticed this elsewhere.) I will contact support and see what's up.

  • sleddogsleddog Member
    edited April 2014

    linuxthefish said: Apache uses a stupid amount of ram.

    No it doesn't. Apache is often berated for its RAM usage, when in fact the memory usage is PHP. If you're running mod_php then the memory used by PHP is accounted for in the apache process.

    Mun said: Apache is far better at doing PHP anyday then php5-fpm which will use more RAM then apache.

    Now php5-fpm uses a stupid amount of RAM? :)

    PHP uses the amount of memory needed to do the job. It doesn't matter a whole lot if you call it via php5-fpm or an apache module. It's still PHP. It still uses RAM. And the amount of RAM it uses is determined by the application, e.g., Wordpress vs hello-world.php.

    On the subject of caching, there's content caching and opcode caching. Cloudfare is a content cache. A content cache can be great or useless depending on your website. If you're running a Wordpress site that gets one new post and a couple comments per week, a content cache is fantastic. But if you're running a busy forum, a content cache is nearly useless. An opcache cache caches compiled PHP code, to speed execution on the next call, and should be installed on any server doing PHP.

    The objective with any server doing PHP should be to find the right balance of PHP listeners (apache or php5-fpm processes). Configure too few and you burn CPU creating and killing them off, and created pageload delays for your viewers. Too many and you waste memory or crash with OOM errors, or start swapping. And if your amount of RAM doesn't support the number of PHP listeners you need, then you need more RAM. Simple.

  • CakeyCakey Member

    wojons said: So i am guessing ur not seeing the performance issue.

    We're on a little bit of a different performance issue with cloudflare saving everything to localstorage creating memory leak issues.

  • udkudk Member

    Hello,

    All of our datacenters are getting upgrades with more servers and we are entering new datacenters to spread out the load evenly.

    There can also be differences between datacenters which would include routing bottlenecks.

    We would also suggest using tools like the ones below to get an idea of how the pages load.
    http://www.webpagetest.org/
    https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/quick-start-quide

    If there is a system wide problem, we try to post it here:
    https://twitter.com/cloudflaresys
    https://www.cloudflare.com/system-status.html

    If you have any additional questions, please let us know.
    https://www.cloudflare.com/support


    The above was the reply from cloudflare support. I included very detailed information in my ticket to them showing it's an issue with their systems/routing, including which datacentre I was being served by (example.com/cdn-cgi/trace)

    I don't think they even read my post, as it clearly showed the problem was with them not my websites.

    For those curious, free plans from UK (at least the 2 ISPs I tested) are getting routed to WAW (Poland) whereas paid plans go to LHR (London)

    tl;dr: you get what you pay for.

  • 100+ ms seems too much for UK to Poland RTT by the way.

  • wojonswojons Member
    edited April 2014

    sleddog said: On the subject of caching, there's content caching and opcode caching. Cloudfare is a content cache. A content cache can be great or useless depending on your website. If you're running a Wordpress site that gets one new post and a couple comments per week, a content cache is fantastic. But if you're running a busy forum, a content cache is nearly useless. An opcache cache caches compiled PHP code, to speed execution on the next call, and should be installed on any server doing PHP.

    I think regarding this it depends on ur wordpress some people us the 3rd party comment system that ajax the comments in. Even if your having a busy blog it will still cache all the images and sub pages that are not changing all the time. Its just less effective.

    Cakey said: We're on a little bit of a different performance issue with cloudflare saving everything to localstorage creating memory leak issues.

    Explain the problem you are having.

    @udk said:

    I am going to run some tests and see if i get the same problem with my sites.

    rds100 said: 100+ ms seems too much for UK to Poland RTT by the way.

    Yeah that should be a lot less

  • wojons said: I would contact there support team with that information they may not be aware of the performance differance

    I am seeing the same situation for a month.

    7 67 ms 68 ms 67 ms oct-cr03-be1.78.spb.stream-internet.net [212.188.2.37]

    8 72 ms 68 ms 67 ms kivi-cr01-ae2.78.hel.stream-internet.net [212.188.29.54]

    9 62 ms 63 ms 62 ms tct-cr02-ae3.231.ams.stream-internet.net [212.188.29.102]

    10 68 ms 67 ms 66 ms tct-cr01-po1.131.ams.stream-internet.net [212.188.28.101]

    11 74 ms 70 ms 68 ms ams-ix.ae1.cr1.ams2.nl.nlayer.net [195.69.145.219]

    12 67 ms 67 ms 66 ms ae3-50g.cr1.ams2.nl.nlayer.net [69.22.139.238]

    13 73 ms 79 ms 73 ms xe-5-3-0.cr1.lhr1.uk.nlayer.net [69.22.142.94]

    14 149 ms 143 ms 142 ms xe-1-0-0.cr1.ewr1.us.nlayer.net [69.22.142.82]

    15 147 ms 147 ms 148 ms xe-3-3-0.cr2.iad1.us.nlayer.net [69.22.142.143]

    16 152 ms 149 ms 148 ms ae2-30g.ar1.iad1.us.nlayer.net [69.31.31.158]

    17 147 ms 148 ms 147 ms as13335.xe-9-0-2.ar1.iad1.us.nlayer.net [69.31.30.14]

    18 147 ms 147 ms 147 ms 141.101.116.121

    It's from Moscow. Traffic is going to USA (Chicago). Same situation on Free Plans from other countries. Traffic is going to USA from Europe.

    However it's still very fast for me.

    I think you should take that calm. CloudFlare has VERY much traffic. They can't handle it for free. So you should upgrade or just ignore that. It's going to back to normal while they will ready (if they will).

  • CakeyCakey Member

    wojons said: Explain the problem you are having.

    Well it isn't just one problem but basically,

    Cloudflare respects the cache values that were before on some nodes (not all of them, don't ask me why only some does it they never answered that) so it will continue to refetch the files even if I make it force cache for a month on for example a JS or a PNG file,

    Now that I can sorta live with but one thing I can't is the continuously checking if file has been updated, they will go to a url like /cdn-cgi/reg/file.js&file.js or so and actually lag every single JS in the code as it loads last even with rocketloader, and you can't turn the way they do it off either and we have a lot of content that gets delayed (Creating lag spikes if not properly there first) which is quite annoying when you have around 300 members a minute trying to browse.

    I can probably show you some examples but I fixed it by letting CF go of my js by putting it on Google's PageSpeed Service.

  • I dont see such differences between 108.162.196.249 and 162.159.247.116

  • Wait wait wait, doesn't CloudFlare only cache the dynamic content and leave HTML content out?

  • CakeyCakey Member

    @eddynetweb said:
    Wait wait wait, doesn't CloudFlare only cache the dynamic content and leave HTML content out?

    With page rules you can force cache html as well.

  • @Cakey I know, but as a default setting...

  • sirmbhesirmbhe Member
    edited April 2014

    i think, reducing resource usage are one of the main purpose we are using CDN service. so, yes, the ram usage will be minimized. I have been cloudflare member for 4 months now, and i am happy. I did not notice, any speed issue with cloudflare, but maybe it is because my website are a light one, both in size and script like php, or something like that. (plus i use varnish in front of my apache server)

  • I used Cloudflare to reduce my RAM and CPU usage. I only saw around 25% drop. Still a substantial amount though.

Sign In or Register to comment.