Jump to content
coyot00

Performance and media servers, setup subdomains

Recommended Posts

Hi, i wanna use media servers on page www.lezecky.sk.

 

http://www.webhostinghub.com/help/learn/prestashop-15-tutorials/performance-and-security-15/setting-media-servers-performance

 

I created 3 subdomains:

 

http://sub1.lezecky.sk/

http://sub2.lezecky.sk/

http://sub3.lezecky.sk/

 

On every subdomains i created statics folders (themes, css, js).

And now i use media servers. (Advanced Parameters -> Performance)

 

All work ok, static data are downloaded from diferent domains, but it`s not what i want, because now i have duplicated data on every subdomain, and it`s hard to keep data actual on every subdomain. After every each change (for example add new product) i have to reupload data to every subdomain.

How can i setup subdomain, to get static folders from parent page (www.lezecky.sk).

 

Can i use .htaccess for setup, or is there any setup proces?

 

Can somebody show me some example, or setup .htaccess file for each subdomain?

 

Thanks guys :)

Edited by coyot00 (see edit history)

Share this post


Link to post
Share on other sites

The term "duplicate content" in an SEO section is not quite accurate in this case, but I understand, that you have problems with maintenance.

 

A simple way to do it is to use another domain if you have one. In your case: lezecky.com for instance.

In your domain setup console on your server: define subdomains as alias for your main domain.

So: define sub1.lezecky.com as an alias for www.lezecky.sk.

Should be easy without any DNS hassle. Ask your hoster if you can't figure it out.

In your PS settings adjust youer mediaservers to sub1.lezecky.com

That's all folks. Your static content is automagically served from another domain, without the need of copying.

 

This setup has the advantage, that the static files should be served cookieless. Which speed up things.

PS cookies are quite large so it's worth striving for.

This technique is also called "domain sharding", I believe. Do a search. You'll see, that it doesn't speed up as much as you might expect.

My tests show, that a site is fastest (on fcgi Plesk), with 1 mediaserver defined. Not more.

For tests use http://www.webpagetest.org/

 

Hope this helps.

  • Like 2

Share this post


Link to post
Share on other sites

Do I need copy something to created subdomains? I don't understand...sorry for this :)

Share this post


Link to post
Share on other sites

Short answer: No.

Long answer:no :)

If you set up your subdomain as alias, then you cannot copy any files to this subdomain as there is no folder.

Alias means, dat Apache serves the files from your main domain folder, when a request comes (in your browser source code) to serve from the alias.

There is 1 pitfall: you need a subdomain setup in another "account" or else the cookies will be served anyway. Please ask your hoster how to do this.

In Plesk you make a new subscription and define your subdomain alias there, if you have a VPS or better.

Share this post


Link to post
Share on other sites

Hi, please if anyone has info on how this has to be done. I've done something and at first the performance get very well (from 10s to 2.5s for product page).

But then something happened and I couldn't even open the site. It goes to Account has been suspended. Admins from hosting said that the problem is in to the .htaccess.

I have it back up and turn it back. The main page opens but now I can't open backoffice.

Fatal error: Call to undefined function mysql_connect() in /home/edress/public_html/classes/db/MySQL.php on line 37

 

So please anyone 

Share this post


Link to post
Share on other sites

I created the subdomains, I followed all possible tutorials, but I see a big problem, there are no images in the mobile
I created 3 subdomains

All redirecting to the main domains. Note that I use certificate, and I think if it is not the problem: :(

 

https://uploaddeimagens.com.br/imagens/screenshot_2017-05-08-20-45-19-gif

 

 

 

PS 1.6.1.12

https://maisvitaminas.com.br/

Edited by sanbikes (see edit history)

Share this post


Link to post
Share on other sites

The more servers and external internet connections you add to your project, the more sources of error you are incorporating in the process. Media Servers are really only for heavy resources like video streams.

 

For to get a good performance for bigger Prestashop projects, it is better to use dedicated servers or VPS on a load balanced network with opcache, fast-cgi, fast php versions, nginx (over apache) or at least nginx pure. All other possibilities like CDN and media servers are not really a good option.

 

@ sanbikes - from what I understood you use SSL, than you store images on another server (not SSL or SSL shared). Do you think this make sense and will work out-of-the-box satisfactorily. For me not a good choice. Take a good hosting package and host by yourself on one speedy server which you have under control at any time and don't send data over several networks.

 

The screen you have attached shows, that whole css is lost (perhaps a problem of changed css, or a problem on data sending over several servers each with other configuration).

Share this post


Link to post
Share on other sites

@selectshop.at.

I don't think I can agree entirely.

CDN is excellent when the CDN's are close to the requests, minimizing latency. And also for reducing overhead serving cookies with every request.

But I agree, especially if you use http/2, the media setting in PS is obsolete for most local sites.

Share this post


Link to post
Share on other sites

 

CDN is excellent when the CDN's are close to the requests, minimizing latency.

Lucky if you have CDN close to you. Most of the cases unfortunately not the case. And loss of speed in bottle-necks in internet connections are very common day by day.

 

I prefere to use best configured server. CDN for me is obsolet and a hype of past days, on where good hosting and good hardware was extremely expensive. Not the case anymore. For me to have outsourced something is only valid for heavy duty applications, like [spam-filter].

 

A well configured server (or little network - database server, email server + FTP server in separate) is enough for to serve Prestashop.

Share this post


Link to post
Share on other sites

About my SSL, it's own and not shared, I also proceed to my own IP address.
   About CDN has its advantages, I've already used MaxCDN and CloudFlare, but some things slow me down, but I lose a few things in terms of configuring the store.

  I already had 2 VPS, they were not very good.
    The big question is that I do not know how to administer a VPS, if someone could help me on how to start this, I could think of switching to a VPS, I've been studying VPS

Share this post


Link to post
Share on other sites

I presume on VPS Linux is already installed ? For to configure your VPS it's really very easy if you use cPanel distribution or Plesk pro.

 

Tested configuration and min. requirements tutorials you will find in Portuguese Forum. Take Plesk and you simply activate the modules you need/want. It's quite easy and you really don't need specific administrator know-how.

Share this post


Link to post
Share on other sites

I have absolutely nothing installed and / or configured let alone know how to administer it. These are insights I'm beginning to research, but the tutorials are still poor.

Share this post


Link to post
Share on other sites

my expereince, cdn's cause more issues (and unpredictable ones).  and is highly overrated.  A well tuned server environment is better than using voodoo. lol  my three cents

  • Like 1

Share this post


Link to post
Share on other sites

Look, what you are trying to do is being a merchant, a developer an SEO and a system engineer at the same time. 4 highly specialized jobs.

So there is 1 rule I live by, when it grows over my head:

First get it done, then get smart.

What the guys are saying here is: if it's complicated, then forget it for now and just start selling things.

After that it grows on you by itself.

There are a lot of tutorials out there on Youtube, on Stackoverflow, but in the beginning it might be all oevrwhelming.

So my advice for absolute beginners is just get the shop running.

Just my 2 cents. If I sound paternal, then I am sorry, but I am almost 64 so I have the right :)

Good luck.

Share this post


Link to post
Share on other sites

I work with prestashop almost from the beginning of its existence :rolleyes:

 

Yes, thanks to God I can perform several functions at the same time, and I got many optimizations, among them learning with prestashop (despite the short time) but nothing with advancing a bit of the dawn

Edited by sanbikes (see edit history)

Share this post


Link to post
Share on other sites

I'm a marketer, but I've always enjoyed learning on my own, I do not consider myself a self-taught person, but with the help of our forum friends, we're learning. It's hard to master everything, but I'm glad I can learn a little from each sector. :)

Edited by sanbikes (see edit history)

Share this post


Link to post
Share on other sites

Well if you expect to learn about how to install and configure servers, so Prestashop is not the correct forum for this. In this case you are better served on Ubuntu, Debian, etc. forums, i.e. the OS you are using. Also YT should be a good place to learn about servers and their best configuration.

 

Prestashop forum is for to learn about Prestashop and the fine tunig of Prestashop. The tutorials named are specific for the best performance FOR Prestashop, so fine tuning on a good server (even with standard installation!). More we cannot support here, because it's out of scope.

Share this post


Link to post
Share on other sites

my advice is use dedicated fully managed server.  the costs seem high until you realize you only need to open a ticket to have  your server configuration changed.  and vps is nothing more than shared that gives you access to 'some' settings.  99% of the time most people pay little/no attention to mysql optimization, that is where the most significant improvements can be made.  I have a 5.7l engine in my car so I'm not likely to run a 4 cylinder for server.

Share this post


Link to post
Share on other sites

my advice is use dedicated fully managed server.  the costs seem high until you realize you only need to open a ticket to have  your server configuration changed.  and vps is nothing more than shared that gives you access to 'some' settings.  99% of the time most people pay little/no attention to mysql optimization, that is where the most significant improvements can be made.  I have a 5.7l engine in my car so I'm not likely to run a 4 cylinder for server.

Not on OVH- VPS Cloud is a 100% dedicated package on a network, so virtual host. You choose the OS you want to have installed and receive a working installed standard package. You choose for ex. Ubuntu, than ubuntu is installed in standard package. You have 100 % root access to your host and can manage by SSH your server, install other components, change ini-files, activate, deactivate, optimize and configure what you want, finally: manage the host like a dedicated server. The secret on this is: root access and not the wording VPS, which by the way the signification of the word is not the same for all.

Share this post


Link to post
Share on other sites

Not on OVH- VPS Cloud is a 100% dedicated package on a network, so virtual host. You choose the OS you want to have installed and receive a working installed standard package. You choose for ex. Ubuntu, than ubuntu is installed in standard package. You have 100 % root access to your host and can manage by SSH your server, install other components, change ini-files, activate, deactivate, optimize and configure what you want, finally: manage the host like a dedicated server. The secret on this is: root access and not the wording VPS, which by the way the signification of the word is not the same for all.

 

having worked in VM systems since 1981...I'm pretty convinced that vps is shared, i.e. it's not dedicted no matter how it looks.  In VM systems there is thing called 'favor' where we specify priority of that machine as compared to other runninig virtuals.  This is no different than 'shared'.  Remember the days shared didn't allow mod_deflate and/or expires?  VPS is just one notch above that.  For untuned VM's, and another VM goes loco...this affects all VM's.  While I am old school and working in those environments for many years maybe things have changed a bit but I've still feel I have fallen very far from old prof to this one....the environments for 99% of www suck. PHP sucks, no shared memory, no spawn of child threads (pthreads experimental), no 'really cached' mysql.  The last two clients that walked into my door using cdn services were amazed how all those bugs that knew about (and didn't know about) magically disappeared once we took the off cdn's.  It's a testament to their products that people even bought from them considering the multitude of bugs found when using cdn's....thanks for letting me share and this kept me from doing work I'm just not that into. lol

Share this post


Link to post
Share on other sites

Well, um. A virtual private server is as virtual as my Ubuntu VirtualBox machines with or without Vagrant under Windows host as far as I know. So shared.

I agree though, that when you have root access, then you can optimize a lot, including the DB and adjusting the buffer (major inprovement), install a tmpfs for the cache (serious improvement) or increase Opcache memory (big improvement). Much better than a media server.

But we have no swap.... No swap on a VPS! "It is not fair to increase memory artificially through swap" was the response of the hoster.

Also if another VPS owner on our shared machine decides to plan a HD backup every night, our VPS grinds to almost a halt. Just in time for Googlebot to crawl out site :(

I think dedicated is the way to go, but you need to sell a lot to cover the cost.

So I find a VPS most costeffective. but not ideal.

The amount of sites on a VPS is limited however. So less possible conflicts.

Share this post


Link to post
Share on other sites

@ El Patron - Well we are mixing here some things and we both are talking about the same type of VM. Root VPS is also virtual, so a host on a network using clustering technique (Hyper-V-Cluster in VM). Root VPS are not shared. Therefore VPS it's not VPS and the secret word is root, as written before. The advantages of this type of virtualization (VPS on clustered network), is that you profit from load balancing over the whole network. If one machine goes down, the others balance the loss of this incident. I never detected any loss of speed, when something was broken or taken down in the network. 99% guaranteed availability is given. VM/VPS are interconnected over a closed LAN.

 

CDN is a content delivery service and not a hosting solution. The sense of CDN is to serve content to end users with high-availability and high-performance, provided there is no bottle-neck everywhere in the lines from the servers associated. We can say that CDN is the modern version for old fashioned "media servers". CDN are interconnected over WAN.

  • Like 1

Share this post


Link to post
Share on other sites

Well, um. A virtual private server is as virtual as my Ubuntu VirtualBox machines with or without Vagrant under Windows host as far as I know. So shared.

No it's not. You can virtualize any machine on any network type. See my explanation on post before.

 

My Root VPS is not shared. It's a host on clustered network, so a dedicated space on a network. Dedicated servers are sole machines (in or outside from a network).

Share this post


Link to post
Share on other sites

With 2 mods in disagreement in een off-topic discussion I can keep chiming in displaying my ignorence :) until an overlord-mod closes off :)

 

https://en.wikipedia.org/wiki/Virtual_private_server

This I sort of understand. I also understand what my hoster told me. I know of a few settings which make my client's machine lightning fast and sometimes as slow as anything slow with the explaination, that another guy is busy with a backup the wrong way.

Whatever. It's not my job. I do know, that PS needs to run on at least VPS, as shared is way too slow. And that domain sharding is not the solution for a fast shop.

 

I am done. Thx for the discussion.

Share this post


Link to post
Share on other sites

But we have no swap.... No swap on a VPS! "It is not fair to increase memory artificially through swap" was the response of the hoster.

This point is a problem of your hoster, which is offering VPS as not real VPS.

 

Of course it is possible to have swap on VPS as well (as prove I attach screen of my VPS). And it's not extra package, just VPS standard package.

 

post-741527-0-31298700-1494529812_thumb.png

Share this post


Link to post
Share on other sites

Well, you groomed me into responding.

I know it's a rediculous point of view of my hoster.

 

I have been looking into OVH you guys mentioned. They are in my country too and they seem to have reasonable pricing.

Talking my client into moving is putting her on extra cost.

I might consider doing it for free. Because OVH offers 100% managed VPS with more memory for less money.

I am looking into Elasticsearch and trying out the free Brad module. But ES and Java eat up all the memory. So I am very concerned about the lack of swap. Maybe not needed if these applications behave well, but it makes me very uncomfortable.

 

So maybe I'll give them a call.

Share this post


Link to post
Share on other sites

Well, despite using a shared hosting (I know it's not ideal) it's up to loading fast, I've done some good optimizations that guarantee me a bit more survival in shared hosting until I descend if VPS or Dedicated.

    I've been through two VPS years ago with older versions prestashop extremely slow, there I contracted more memory and still caught.
   With evolution of prestashop and optimization, even in a shared hosting I dare say that it is better than that time of the VPS


    I still see possibility of performance gains by reducing a number of http requests in images using CSS sprites, I just need to give the start :rolleyes:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More