• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

should we keep Apache Tomcat and FTP on same server ?

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic