• Post Reply Bookmark Topic Watch Topic
  • New Topic

should we keep Apache Tomcat and FTP on same server ?  RSS feed

 
abhinas raj
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

In my project i am using Apache Tomcat and FTP server. files are manually put in a folder (say A )at FTP server from this folder files taken and put into another folder(say B) after processing [code to create these folders
is inside Tomcat ] . FTP server gives those files [from folder B] to Tomcat for processing. so folders A and B has to be created on the server on which FTP is running. but if we put Tomcat and FTP on same sever then
folders A and B will be created 2 times [once by code running at Tomcat and second time by FTP server] is it true ? so do we need to keep Tomcat and FTP always on different server.

 
Tim Moores
Saloon Keeper
Posts: 3835
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question where a server process runs shouldn't depend on where files live. It's easy to share directories across a network with little performance impact (until and unless proven otherwise).

Also, code should not create directories without checking first whether they exist, and taking appropriate action in either case.
 
Tim Holloway
Bartender
Posts: 18663
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From a performance point of view, an FTP server is rarely a big resource consumer, so it's usually OK to put it on the same machine as you would Tomcat.

From a security point of view, you may find it desirable to keep the 2 subsystems in separate containers, VMs, or even physical boxes so that an exploit of one server will have less opportunity to exploit the other. Plus, of course, virtualizing/container technology allows more freedom to rearrange the data center's load balancing.

FTP and Tomcat would typically just share a common directory, as Tim said. That might be as simple as configuring the webapp to look into the FTP data directory (and have proper access rights) or using a shared network mount.

There's really not much more to say beyond that.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!