0

background

i'm working on a very small team to update the css on a struts 2 website. i'm deploying my code to a tomcat server for testing, and the server pulls its data from an oracle database running in a centos virtualbox. needing a way to connect my teammates to my machine, i connected my computer's ip address to a dynamic dns (ddns) service at freedns.afraid.org and set-up forwarding on my router to route port 8080 traffic to my local machine (base URL example: http://nameOfMyApplication.chosenDDNSDomain.com:8080/nameOfApplicationRootDirectory/)

specs

  • processor: intel core i7-9700k cpu @ 3.60ghz
  • installed ram: 16.0gb (15.7gb usable)
  • os: windows 10 pro 64-bit version 1903
  • internet: wi-fi connection to at&t fiber
  • router: arris bgw210
  • server: apache tomcat version 6.0.37
  • java runtime environment: 1.6.0_45
  • vm: oracle virtualbox version 5.2.6 r120293 (Qt5.6.2)
  • vm os: centos version 5.7
  • database: oracle database version 11.2.0

problem

while i think this configuration should generally work for very small load testing (3 users maximum), i'm running into issues even when i am the only user testing the application. pages take a long time to load, and the connection times out roughly half the time on my local machine. sometimes page content loads with none of my css applied. the css seems to either work entirely or not at all, and a given page's css may work at one point but not at another. our website build involves a "baseUrl" string, so i don't believe i can have the application built for both localhost and ddns access at the same time.

questions/requests for advice

  • is there anything about connecting to my own machine through the internet that would make things load especially slowly? while i expect some slowdown since my machine is sending the request, receiving/processing the request, responding to the request, and receiving/processing the response, i'm wondering if i should expect the slowdown to be so great that the site is not reliably usable.
  • how would i go about determining where the slowdown is occurring? while the domain i'm using for my ddns has been running without any apparent downtime, i'm wondering if there is some domain-specific issue or maybe an inefficiency in how freedns.afraid.org domains do dns look-up. essentially, i'm looking to figure out if my problem is caused by the general strategy i'm using or just the specific ddns provider i chose.
  • General note to readers, [this was closed on Stack Overflow](https://stackoverflow.com/questions/60383803/afraid-org-ddns-connection-to-local-server-is-very-slow-often-timing-out-look), and it was suggested that it might be on-topic here (I have no view as to whether it is). – halfer Feb 25 '20 at 22:41
  • init1312 - you previously received the advice that posting legible and readable material is valued on Stack Overflow, and in general, "this is just my personal style" is not something readers have much time for. Spelling and case standards exist in order to aid readability, and mobile-phone posting, if done deliberately, hurts that aim. As with all Stack Exchange sites, Server Fault is also intended as a long-term repository of useful Q&A, and I recommend you bear that in mind when posting. – halfer Feb 25 '20 at 22:44

1 Answers1

0

A couple of things:

  • You've given the specs of your machine (presumably) but not the specs of your VM. You should check the available resources of the CentOS VM and ensure that it is not starved for CPU, RAM, or HD (including swap space).
  • You ought to be able to have your coworkers test the IP address of your system directly and rule out the ddns as a source of slowdown. I would generally not consider the ddns to be the problem, especially as after the initial resolution the systems should cache the entry for the TTL (time to live) period which is usually 1 hour. That means the DDNS service is out of the picture until the TTL expires. So if you see an initial connection being slow followed by faster ones, it could be related but otherwise I don't think DDNS is related
  • Some ISPs are jerks and will mess with direct connections including ones they perceive as a 'threat' (loss of revenue for a paid service, over bandwith usage, or security threats). Try hosting something completely different on the same port and/or the same thing from a non-standard port and see if you're seeing the same problem.
  • The way that your VM connects to your network may have an impact on the way it performs. In general you're going to see two options: NAT or direct connection. With NAT, the VM sits on an artificial IP behind the host IP. With direct connection, the machine will try to emulate a physical machine on the host network. The direct connection route in general seems better but can fall victim to security technologies that do not allow MAC spoofing or "forged transmits". Try both options and see if you see a difference.
  • Does the default page for your technology (tomcat) work any differently than your custom code? Try a different tech such as nginx and see if it loads differently.
  • Your use of Java 6 makes me sad. Very very sad. Please update to Java 8u241 at a minimum or Java 13 if you can.
  • I see you mention WiFi. Is your host/vm running off of WiFi? Try directly connecting to your router with Ethernet and see if you see a difference.
  • Are you able to access your own server locally without issue? What about with the external IP? Have you tried a service like https://isitdownrightnow.com or https://translate.google.com to see if your page is available there? It's possible the connections from your coworkers are not ideal.
duct_tape_coder
  • 755
  • 3
  • 12
  • thanks for the response! very good point on the ttl caching - that makes me think the timeout issue doesn't actually have to do with the ddns service. regarding your nat suggestion, i unfortunately had a lot of issues with trying to use nat, and the vm only seemed to work when i set the connection to "bridged adapter." unfortunately, i can't try plugging directly into my router, as i use a desktop and don't have an ethernet cable long enough to reach it. and sorry about the java 6 haha. trust me, we would be on a recent version if it were my choice. – init1312 Feb 28 '20 at 18:18
  • i'm far enough into my work now that my coworkers have just decided to deploy my .war file on their test server instead of connecting to my machine directly, so it seems i won't have to use ddns anymore at the moment. thank you for the recommendations, though, as they give me a lot of good places to look if we do need to use this kind of connection for testing again in the future. – init1312 Feb 28 '20 at 18:21