0

Here is what I normally see on a website, you create a profile, and you get your own page. For example, you create a profile at stackoverflow, you get a page at https://stackoverflow.com/users/4639104/yourname.

Using PHP I can mkdir() and fopen(), but if I have 100 webservers, do I mkdir and fopen to all 100 servers? What is the best way to handle this?

Community
  • 1
  • 1
david
  • 1
  • 1
  • 3
  • 4
    They don't create a directory/file for each user. – Darren Mar 06 '15 at 01:37
  • Read more about `Friendly URLs`. Here: http://webdesign.tutsplus.com/articles/how-to-create-an-seo-friendly-url-structure--webdesign-9569 and here: http://stackoverflow.com/questions/25259/how-does-stack-overflow-generate-its-seo-friendly-urls – Dimas Pante Mar 06 '15 at 01:40
  • 2
    Pages on a website don't necessarily correspond to files on webserver. – gvlasov Mar 06 '15 at 01:41
  • 1
    Yeah. They aren't actually creating directories, but using url rewrites to get information out of the path. – kylehyde215 Mar 06 '15 at 01:41

1 Answers1

0

If you need to replicate files between servers you can achieve it using tools like rsync.

But you wouldn't use rsync if you really 100 servers. In that case you MUST to use a CDN (Content Delivery Network). So you can publish assets just once and access them from all your servers. There are free, cheap and very power CDN servers.

David Vartanian
  • 460
  • 4
  • 12