Support the ongoing development of Laravel.io →
Installation Configuration Security
Last updated 2 years ago.
0

Sessions: Redis should be fine, alternatives would be memcache or database Storage: NFS is good

I notice you have no redundancy on the DB or file server, likewise you should look at failover with 2 load balancers

Check out glusterfs and clustering mysql

0

I'm confused and may need some clarification

  • Storage, the storage/resources folder might need to be global for the laravel applications on both web servers. I have been thinking about mounting a directory from the storage server into the web servers to ensure that both web servers will have the same set of files in their storage/resources folder. Is NFS (Network File System) a good way to do this?

When talking storage/resources folder do you exactly mean the 2 laravel framework's folders:

  • storage
  • resources

assuming you use Laravel 5 or a just a central storage peculiar to your application?

If so, resources folder is a good candidate for sharing (same static files just read and processed accordingly by any framework instance at some point of its life cycle) whereas some subfolders of storage are used by the running instance to write its own working/temporary files (risk of collision if shared my opinion to - I need to dig more, so far I don't have an idea of file naming scheme. My intuition is that the framework doesn'it make a provision to handle concurrency for it).

Otherwise the filesystem abstraction provided by Laravel 5 is an another valuable way to consider without tweaking system level.

Last updated 9 years ago.
0

elite123 said: Sessions: Redis should be fine, alternatives would be memcache or database

Sessions using Redis seems to be fine, I just tested it on two different servers using a load balancer.

elite123 said: Storage: NFS is good

So if I am right I should make a mount from my two web server into the storage server on laravel-project/storage. But would this give problems when deploying from Git? Since it then clean up the folder and get all the new files. Would that not remove the mount? Or do I have to make the storage folder for laravel be somewhere else?

elite123 said: I notice you have no redundancy on the DB or file server, likewise you should look at failover with 2 load balancers So you mean that my Database Server and my Storage Server would end up failing since they do not have a redundance server or a load balancer. Or what?

0

menjaraz said: When talking storage/resources folder do you exactly mean the 2 laravel framework's folders:

By this I mean exactly and only the laravel storage folder. I do not see a reason for using it for the Laravel resources folder (correct me if I am wrong).

menjaraz said: If so, resources folder is a good candidate for sharing (same static files just read and processed accordingly by any framework instance at some point of its life cycle) whereas some subfolders of storage are used by the running instance to write its own working/temporary files (risk of collision if shared my opinion to - I need to dig more, so far I don't have an idea of file naming scheme. My intuition is that the framework doesn'it make a provision to handle concurrency for it).

Correct me if I am wrong, but two instances of Laravel can share the same set of storage files (from Laravel's storage folder). So this should work quite well, right?

menjaraz said: Otherwise the filesystem abstraction provided by Laravel 5 is an another valuable way to consider without tweaking system level.

I have been looking into the filesystems that Laravel 5 have included, but I want to host the files on my own server instead of using AWS or Rackspace.

Last updated 9 years ago.
0

marktopper said: By this I mean exactly and only the laravel storage folder. I do not see a reason for using it for the Laravel resources folder (correct me if I am wrong).

Ok, I can see clearly now: You can do indeed without sharing it.

By the way what about the static assets usualy stored under Laravel public folder? No need also of shared management?

marktopper said: Correct me if I am wrong, but two instances of Laravel can share the same set of storage files (from Laravel's storage folder). So this should work quite well, right?

I've heard of a corner case where people using load balancing complained of fatal error due to view/blade regeneration issue (They are stored in Laravel resources/views folder, compiled as needed and cached into storage/framework/views folder).

They use a setting where the replicate instances are synced from a master: Laravel resources/views folder being also not shared - Each instance compiles as needed by its lifecycle its own views into the shared storage/framework/views folder.

Laravel uses timestamp to ascertain expiry.

marktopper said: I have been looking into the filesystems that Laravel 5 have included, but I want to host the files on my own server instead of using AWS or Rackspace.

Don't forget your choice introduce one point of failure with a possible bottleneck (some latency).

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

marktopper marktopper Joined 25 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.