rmfakecloud icon indicating copy to clipboard operation
rmfakecloud copied to clipboard

Feature Request: Separation support for Backend/Front-end

Open TheOrdinaryWow opened this issue 4 years ago • 9 comments

Hi dear dev. Is it possible to request a feature of separating rmfakecloud's front-end and backend?

eg. I can setup the website (web.my.domain) as well as Nginx on server A, but files storage at server B (uploading files straight to server B) (files.my.domain) . And the traffic does not relay through server A to B, but is delivered directly to B.

TheOrdinaryWow avatar May 04 '21 14:05 TheOrdinaryWow

you could probably run 2 instances of rmfakecloud with the same JWT_SECRET_KEY,. and set the STORAGE_URL to point to server B

ddvk avatar May 04 '21 16:05 ddvk

So in this way will the traffic be directly transmitted to server B or will be relayed through A to B?

TheOrdinaryWow avatar May 05 '21 08:05 TheOrdinaryWow

some things will go to A (metadata), but the files (.zip) will be sent to B

ddvk avatar May 06 '21 12:05 ddvk

So can I set the STROAGE_URL to a server B which didn’t configure SSL like 192.168.100.15:3000, while the server A use a reserve proxy ( as https://my.rmfakecloud.domain) ? Does doing so cause SSL issue?

TheOrdinaryWow avatar May 10 '21 10:05 TheOrdinaryWow

ssl should not be an issue, the storage url can work withouth ssl, but i haven't tested this setup

ddvk avatar May 10 '21 12:05 ddvk

ssl should not be an issue, the storage url can work withouth ssl, but i haven't tested this setup

Well I wonder if it's good to do so since I've been using rmfakecloud for a while and some files have been storage. So after I placed the files on Server A to Server B and sry up STORAGE_LINK to server B and it should work fine then?

TheOrdinaryWow avatar May 13 '21 07:05 TheOrdinaryWow

you ll have to copy the .zip files over

ddvk avatar May 13 '21 18:05 ddvk

you ll have to copy the .zip files over

Hi, dev.

If I want to separate the original server A to two server ( frontend server A + backend server B).

The reason I’m doing that is now server B doesn’t allow SMTP, but server A does. However server A has limited disk, but not limiting SMTP. Thus I want to use A as a front-end, and B for backend, storaging files.

Is it correct to follow the instructions below, according to what you said in this issue?

  1. Move *.zip on server A to server B, left *.metadata on server A.
  2. Set same JWT_SECRET_KEY on both machine, set the STORAGE_URL on server A to point to server B.
  3. Run instances on both machine.

Still have two questions:

  1. What protocol should the STORAGE_URL set be? http:// or https://? Should server B force HTTPS?
  2. If the STORAGE_URL set is a url, is rmfakecloud able to locate the file folder itself?
  3. If I use the setup above, which server will handle SMTP?

I would really appreciate it if you could please offer some help.

Thanks!

TheOrdinaryWow avatar Dec 08 '21 04:12 TheOrdinaryWow

server B can use either http or https they can be different hosts but have to have public dns names (an ip would also work but not with https)

though other things may not work

cant you use an nfs or samba moint from server B as the /data folder on server A?

ddvk avatar Dec 08 '21 09:12 ddvk