What happens when I ping 127.0.0.1 [closed] - ping

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
It might seem a little stupid but I'm curious to know what really happens when I ping the loop-back IP address, ping 127.0.0.1.
Does OS treat it in a special way?

The 127.0.0.0/8 is a CDIR netblock reserved by IANA and it's called Loopback. This traffic is routed by kernel to a a special network adapter called loopback adapter. It never hits the OSI Model Layer 1, as any local traffic.
For most all OS data travels across the network kernel services until the IP stack. At this point the data will be send back without hitting the physical layer and the real NIC hardware.
This work is done almost entirely from the host system's CPU, which means a great simplification compared to the physical network transmission. Modern OS kernels are able to detect the loopback traffic and grant speeds over than fastest nowadays physical adapters (> 50GBps).

I do not think that OS treats this IP any different from the rest except that it points back to local machine.
http://www.rolo.org/127-0-0-1.html

Related

How to allow all network public ip to access my database? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am trying to make my database available on the internet so I hosted my database on Google Cloud Platform. With their instructions, I am able to connect with my public IP address to access the remote database with my MySQL Workbench & make request with the database public IP address.
However, I realize that my IP could change because public IP is different on every network, which may mean my database is stuck on the local computer environment. What should I do to make the database available to all networks? I want thrid party users to use my api to get data from my remote database.
I am not sure putting the server on the internet is what a developer supposed to do, just trying to get things out of localhost but I am very confused. Please help me :)
The problem (I think)
Public IP changes on different router, cutting off my database connection.
You can add all public-ip range into your "Authorized networks"
Add 0.0.0.0/0 as allowed CIDR for IPv4

Internet of Things - How to initially connect the device? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
When thinking about the "internet of things", I am imagining a home appliance that needs to connect to the home Wi-Fi and from there one can use their smartphone to control the appliance. This should remove the need for any interface of the devide (USB / LCD / etc). But how would you initially connect this device to the internet? you need some initial configuration. It make no sense to have, say, a USB interface used for initial configuration, i.e. a one-time only job. Any ideas?
All devices will require some sort of user I/O to configure WiFi. This is unavoidable, but can be simplified through some other method like you had mentioned. A reliable option would be to connect to the device via bluetooth to configure it, and then have it rely on WiFi afterward.
You may also want to take a look at how Google does it for the Chromecast. First, the Chromecast broadcasts its own WiFi signal for the user to connect to. It then uses the app to configure the WiFi. When complete, the device reboots and connects to the signal as configured by the user. Now there is no need for external interfaces (LCD, USB) and you can use the same smartphone application to configure it.
Hope this helps!

Load balancers and SQL backups [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Our production environments typically consists in 4-8 Apache web servers and 2 (My)SQL servers :
Each web server is affiliated to one SQL server
SQL servers have a circular replication setup
All web servers are load balanced, by Pound for example.
Every night a job backups one of the SQL servers, locking the affiliated web servers for about 10-15 minutes.
Is there a way to configure the balancing to avoid reaching those locked servers for a short time?
Is there another way to handle this lock, other than backuping a non-production third server?
PS: We envisage to reload the Pound configuration, just before and after the backup, with an appropriate configuration file, but it feels a bit odd...
How about using poundctl to disable and reenable the backend server? It must be run locally (the command protocol uses unix sockets), but you could probably have it launched remotely through an ssh session.
From the man page:
OPTIONS
[...]
-B/-b n m r
Enable/disable a back-end. A disabled back-end will not be passed requests to answer. Note however that existing sessions may still cause requests to be sent their way.
-n n m k
Remove a session from service m in listener n. The session key is k.

How to connect NVIDIA CUDA PCI-E graphic card over USB? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I would like to run some CUDA calculations, but I have only simple notebook without NVIDIA.
Is there any USB adapter that allows to connect NVIDIA graphic card to my notebook?
That would be great if there is such a device, that I connect my NVIDIA card, plug it into my computer, run calculation, and disconnect from laptop until calculations are finished.
Unfortunately not.
USB is very-very slow compared to the internal bus to the graphics card in a PC, so the speed of the GPU for calculations would be wasted by the long time to copy the data there and back.
USB is alos message based, it doesn't allow your computer to see the GPU card memory (or the other way around) so you would effectively need another computer on the GPU end to unwrap things.
There is a new high speed connector called Thunderbolt which is (essentially) the PCIe bus inside your computer connected to a socket. This would allow an external device (like a GPU) to act like it was directly connected to the bus. But it's only on a few expensive models today and not many devices exist for it (yet).
Amazon do now offer GPUs on their cloud service, but this might be a bit expensive for just learnign / playing with.

Want to know what is ipv4 and ipv6? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Want to know what is the difference between ipv4 and ipv6 and how does it affect the openstream()
The basic difference is the number of available addresses. IPv4 has a 32-bit address whereas IPv6 has 128 bits.
This allows for a massive expansion in IP addresses, probably enough for every fridge, microwave or other white good on the planet to have its own class C subnet :-)
Actually, that's probably only funny once you understand a lot more about IP addressing so feel free to just laugh nervously if you don't understand :-)
There's some extra goodies in v6 but the IP address expansion is pretty well the major feature.
See also wikipedia for IPv6 and IPv4. There's a section in that first link which details some of the IPv4/IPv6 differences.
The difference is in packet headers. One protocol has different headers than the other. Don't think this would affect an openstream() call. Chances are the socket will take care of the headers automatically and you're stream will only be concerned with the payload of the packet (Java..?). Write a test program and find out!