How to map URL to IP?

455

Solution 1

First you must register your domainname with a suitable registrar.

As part of this the IP addresses of 2 computers that will serve as "DNS servers" are required. Many registrars provide these servers as part of the service.

Next the "DNS zone files" on those "DNS Servers" need to be updated to include a reference that basically says "www.mydomain.com is at IP address 123.321.123.321" Again most registrars provide an easy way to do this.

The computer with IP address 123.321.123.321 must be on the internet and running a web server that can respond to requests.

Then when someone types in www.mydomain.com, their local DNS system looks up the zone file (or a locally cached copy their ISP has) and this tells them the 123.321.123.321 IP address. The web browser then sends a "give me this web page" message directly to that IP address. Which then sends them back the web page.

Solution 2

You need to use a service like Zoneedit which not only provides DNS services but can handle dynamic IP addresses like you probably have if you're hosting your own server locally.

Share:
455

Related videos on Youtube

xspydr
Author by

xspydr

Updated on September 18, 2022

Comments

  • xspydr
    xspydr over 1 year

    Have a question about how to better optimize or speed things up. Currently my code seems to be running a bit slow...

    I have the following classes

    public class DataFoo : IFoo { }
    
    public class Foo
    {
         internal IFoo UnderlyingDataObject{get;set;}
    
         public Foo(IFoo f)
         {
              UnderlyingDataObject = f;
         }
    }
    

    Now, in many cases I end up needing or calling a method that will provide back a List. This method will initially get a array of DataFoo objects and will iterate over all returned objects instantiating a new Foo object passing in the DataFoo... Here's an example...

    public List<Foo> GetListOfFoo(Guid id)
    {
         DataFoo[] q = GetArrayOfDataFoo(id);
         List<Foo> rv = new List<Foo>();
    
         for(var i = 0; i < q.Length; i++)
         {
               rv.Add(new Foo(q[i]));
         }
         return rv;
    }
    

    The issue is that having to iterate over and instantiate like this seems pretty slow. I was curious if anyone might have suggestions on how to speed this up...

    • ChrisF
      ChrisF over 14 years
      Have you profiles your code to verify that a) it is running slow and b) this code is the bottleneck?
    • xspydr
      xspydr over 14 years
      i'm converting the code from a existing linq to sql implementation to this approach using nhibernate/fluent nhibernate... from what i'm seeing comparing the two versions; the new code is slower. which it's slower either because nhibernate was introduced or because of all the for loops that are occurring...
    • Marc Gravell
      Marc Gravell over 14 years
      Use a profiler to check for performance bottlenecks - not guesswork; they are rarely where you expect. I would expect the change of ORM provider to be much more significant than looping performance.
    • Drew Noakes
      Drew Noakes over 14 years
      How many items are you talking about? What kind of response times are you expecting? Are we talking microseconds or seconds?
    • xspydr
      xspydr over 14 years
      See that's the thing. We're not talking about huge amounts of items. Max maybe 500... Anyone want to recommend a good profiling tool..?
    • Drew Noakes
      Drew Noakes over 14 years
      I personally use DotTrace from JetBrains for profiling. It does a good job of both performance and memory profiling, but it's a little pricey. You can evaluate it for 10 days from memory though.
    • Drew Noakes
      Drew Noakes over 14 years
      You might also use an NHibernate profiler. I believe Ayende Rahien has one.
    • TrueWill
      TrueWill over 14 years
      There's also a free one at eqatec.com/tools/profiler
  • Marc Gravell
    Marc Gravell over 14 years
    Cheers; I missed the conversion ;-p
  • xspydr
    xspydr over 14 years
    GetArrayOfDataFoo is using fluent nhibernate/nhibernate and linq to nhibernate to simply make a linq call to the database and get back an array of objects...
  • Drew Noakes
    Drew Noakes over 14 years
    Then I would focus your energy on that area of your code, rather than the decorator pattern or conversion. That's just the tip of the iceberg. Use a profiler to find out what's going on. I believe Ayende Rahien has an NHibernate profiler, but I haven't used it myself.
  • bevacqua
    bevacqua almost 13 years
    Not locally, it's a dedicated server but I was using it to host a game server, now I want to host the website there aswell.
  • John Conde
    John Conde almost 13 years
    Do you have a control panel for your server? If so, what is it called?
  • bevacqua
    bevacqua almost 13 years
    I just have a remote desktop connection through which I'd do all the work