CN109768897B - Server deployment method and device - Google Patents
Server deployment method and device Download PDFInfo
- Publication number
- CN109768897B CN109768897B CN201811566494.4A CN201811566494A CN109768897B CN 109768897 B CN109768897 B CN 109768897B CN 201811566494 A CN201811566494 A CN 201811566494A CN 109768897 B CN109768897 B CN 109768897B
- Authority
- CN
- China
- Prior art keywords
- users
- server
- deployment
- address
- network delay
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention discloses a server deployment method and a server deployment device, wherein the method comprises the following steps: acquiring IP addresses corresponding to M users respectively to obtain an IP address set; measuring the network delay from a server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set along a preset direction to obtain the network delay of each geographical position; and determining the geographical position with the minimum network delay as the position of the deployment server. By the method and the device, the preferred deployment position of the server can be determined, and therefore high-quality network service is provided for multiple users.
Description
Technical Field
The invention relates to the technical field of internet, in particular to a server deployment method and device.
Background
At present, with the rapid development of internet technology, more and more users have higher and higher requirements for the quality of network services, and many network services, such as search engines, online video services, game services, etc., need to utilize servers widely distributed in different geographic locations to ensure the quality of services.
In practical applications, the fact that a high-quality network service can be provided for a user means that the network delay of a server for the user served by the server is small enough, and therefore, a network service provider has to deploy enough server resources in a place close to the user in order to provide better network service for the user. In a user globalization environment, particularly when a user group may be distributed in each country in the world, deployment of a server must take care of the delay experience of users in each region, so how to determine a location where the server can be deployed to shorten the delay between a client and a server as much as possible is an urgent technical problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a server deployment method and device, which can determine the optimal deployment position of a server, thereby providing high-quality network service for a plurality of users.
In a first aspect, an embodiment of the present invention provides a server deployment method, where the method includes:
acquiring IP addresses corresponding to M users respectively to obtain an IP address set;
measuring the network delay from a server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set along a preset direction to obtain the network delay of each geographical position;
and determining the geographical position with the minimum network delay as the position of the deployment server.
According to the embodiment of the invention, the terminal measures the network delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set along the preset direction, and then determines the geographical position with the minimum network delay as the position of the deployment server after the network delays corresponding to the plurality of geographical positions are obtained, so that the optimal deployment position of the server can be determined, and high-quality network service is provided for a plurality of users.
Optionally, the M users are M users in the same area;
The measuring, in the preset direction, the network delay from the server corresponding to each geographic location in the candidate deployment location to each IP address in the IP address set to obtain the network delay of each geographic location includes:
and measuring the network delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the network delay of each geographical position.
Optionally, the M users are M user areas;
the measuring, in the preset direction, the network delay from the server corresponding to each geographic location in the candidate deployment location to each IP address in the IP address set to obtain the network delay of each geographic location includes:
measuring the network delay from a server corresponding to each geographical position in the candidate deployment positions to each type of IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the average network delay of each geographical position;
the determining the geographical location with the minimum network delay as the location of the deployment server includes:
and determining the geographical position with the minimum average network delay as the position of the deployment server.
Optionally, before obtaining the IP addresses corresponding to the M users respectively and obtaining the IP address set, the method further includes:
determining the candidate deployment location.
Optionally, one or more servers are deployed at the determined location of the deployment server.
In a second aspect, an embodiment of the present invention provides a server deployment apparatus, which includes means for performing the method of the first aspect. Specifically, the apparatus may include:
the acquiring unit is used for acquiring IP addresses corresponding to the M users respectively to obtain an IP address set;
the measuring unit is used for measuring the network delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set along the preset direction to obtain the network delay of each geographical position;
the first determining unit is used for determining the geographical position with the minimum network delay as the position of the deployment server.
Optionally, the M users are M users in the same area; the measurement unit is specifically configured to:
and measuring the network delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the network delay of each geographical position.
Optionally, the M users are M user areas; the measurement unit is specifically configured to:
measuring the network delay from a server corresponding to each geographical position in the candidate deployment positions to each type of IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the average network delay of each geographical position;
the first determining unit is specifically configured to:
and determining the geographical position with the minimum average network delay as the position of the deployment server.
Optionally, the apparatus further comprises:
and the second determining unit is used for determining the candidate deployment positions before the acquiring unit acquires the IP addresses corresponding to the M users and the IP address set is obtained.
Optionally, one or more servers are deployed at the determined location of the deployment server.
In a third aspect, an embodiment of the present invention provides another terminal, which includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program that supports the terminal to execute the foregoing method, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the foregoing method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, the computer program comprising program instructions, which, when executed by a processor, cause the processor to perform the method of the first aspect.
In a fifth aspect, embodiments of the present invention provide a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect.
According to the embodiment of the invention, the network time delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set is measured along the preset direction, and then the geographical position with the minimum network time delay is determined as the position of the deployment server after the network time delays corresponding to the plurality of geographical positions are obtained.
Drawings
In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings used in the description of the embodiment will be briefly introduced below.
Fig. 1A is a schematic network architecture diagram of a server deployment system according to an embodiment of the present invention;
fig. 1B is a schematic flowchart of a method for deploying a server according to an embodiment of the present invention;
fig. 2A is a schematic diagram of Traceroute performed on an IP address according to an embodiment of the present invention;
fig. 2B is a schematic diagram of whois query of an IP address according to an embodiment of the present invention;
fig. 2C is a schematic structural diagram of a server cluster according to an embodiment of the present invention;
fig. 3A is a schematic block diagram of a server deployment apparatus according to an embodiment of the present invention;
FIG. 3B is a schematic block diagram of another server deployment apparatus provided in an embodiment of the present invention
Fig. 4 is a schematic block diagram of a terminal according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In particular implementations, the terminals described in embodiments of the invention include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
For the convenience of understanding of the present application, how to determine the geographic location where the server may be deployed in the embodiment of the present invention is specifically described below with reference to the application scenario diagram shown in fig. 1A. Fig. 1A is a schematic structural diagram of a server deployment system according to an embodiment of the present invention. Wherein the candidate deployment locations include geographic location 1, geographic location 2, … …, geographic location n. In a specific implementation, a server is deployed in each geographic location in the candidate deployment locations. The network latency for each geographic location may be obtained by measuring, in a predetermined direction, the network latency of a server corresponding to each geographic location in the candidate geographic locations to each IP address in the set of IP addresses (e.g., IP address in geographic location 1, IP address in geographic location 2, IP address in geographic location 3, etc.). Here, the network delay, i.e., the network delay, refers to the round-trip time of a data packet sent from the user's computer to the web server and then immediately returned from the web server to the user's computer (e.g., terminal). In popular terms, the time it takes for data to pass from the server side to the terminal side. And then, determining the geographical position with the minimum network delay as the position of the deployment server. In practical applications, the number of the servers deployed in the geographical location with the minimum network latency may include 1, or may include a plurality of servers (i.e., a server cluster).
Based on the network architecture shown in fig. 1A, the following flowchart, in combination with the flowchart of the server deployment method provided in the embodiment of the present invention shown in fig. 1B, specifically illustrates how to determine the deployment location of the server in the embodiment of the present invention, which may include, but is not limited to, the following steps:
and S100, acquiring IP addresses corresponding to the M users respectively to obtain an IP address set.
In a specific implementation, M is a positive integer greater than 0. For example, M may be 1000, 2000, or the like, and the embodiment of the present invention is not particularly limited.
For the example of the escape of the temple, the data of the escape of the temple is stored in a predetermined memory address. The data of the escape game of the temple may include access information of the player, equipment information of the player, the number of breaks of the player, and the like.
In a specific implementation, the terminal acquires the IP address of the player from the access log.
For example, the access log may be represented as shown in fig. 2A, and the IP address of the player obtained by the terminal from the access log may include: 102.122.239.128, respectively; 213.87.156.196, respectively; 74.50.213.104, respectively; 74.50.213.255, respectively; 81.215.217.2, respectively; 130.255.68.209.
in one embodiment, before step S100, the method may further include: determining the candidate deployment location.
In practical applications, the terminal may determine candidate deployment locations based on big data statistics. Taking the game of the temple fleeing as an example, the terminal can acquire the number of players playing the game of the temple fleeing in a plurality of different geographic positions through a big data analysis platform, and determine the geographic position in which the number of the players in the plurality of different geographic positions exceeds a set threshold value as a candidate geographic position. By the implementation mode, network time delay corresponding to a large number of geographical positions does not need to be determined, and the deployment efficiency of the deployment server can be improved.
In an actual application scenario, a server is actually deployed in each geographic location in the candidate deployment locations related to the embodiments of the present invention.
Step S102, network time delay from a server corresponding to each geographic position in the candidate deployment positions to each IP address in the IP address set is measured along a preset direction, and the network time delay of each geographic position is obtained.
In a specific implementation, the preset direction referred to herein is a direction from the server side to the player side.
In one embodiment, the M users are M users in the same area. The measuring, in the preset direction, the network delay from the server corresponding to each geographic location in the candidate deployment location to each IP address in the IP address set to obtain the network delay of each geographic location includes:
And measuring the network delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the network delay of each geographical position.
In the specific implementation, the working principle of Traceroute is as follows: traceroute sends an IP packet with a time to live value TTL (TTL) of 1 to the destination, where the IP packet is 3 packets with 40 bytes, and in a specific implementation, the IP packet includes a source address, a destination address, and a time tag sent by the packet. When the 1 st Router (Router) on the path receives this packet, it decrements the TTL by 1. At this time, TTL becomes 0, so the router will drop this packet and send back an ICMP (Internet Control Message Protocol, ICMP) Message (where the ICMP Message includes the source address of the sending IP packet, all contents of the IP packet and the IP address of the router), after receiving this Message, Traceroute knows that this router exists on this path, and then Traceroute sends out another packet with TTL of 2, when 2 nd router receives this packet, it reduces TTL by 1 until TTL is 0, and 1 st router on the path will drop this packet and send back an ICMP Message with timeout. Thus, Traceroute adds 1 to the TTL of the outgoing packet each time to discover another router, and this iterative process continues until a packet arrives at the destination. When the packet reaches the destination, the host (e.g., terminal) does not send back a timeout ICMP message since it is already the destination.
In the embodiment of the invention, the network delay value is the external network IP which is closest to the player and is returned by the ICMP message, thereby avoiding the problem that the partial operators shield the ICMP message in the network and cannot return the delay value. Meanwhile, the IP from the player equipment to the operator exit gateway belongs to the same operator network, and the path and time consumption of the section inside the player operator are the same no matter where the service server is deployed, so that the statistical deviation of the last kilometer of the user can be eliminated.
In practical applications, the M users here refer to M users in the same area (e.g., the same country). For example, taking the example of an expectation of a desire to provide network services to players in the Turkish republic, a whois query for an IP address is performed to obtain a set of IP addresses for the Turkish republic. A candidate deployment location for the server is germany, usa. In an actual application scenario, a server is actually deployed in each geographic location in the candidate deployment locations, and after Traceroute is performed on each IP address in the IP address set of the republic of turkish, the average network delay from the server in germany and the server in the united states to each IP address in the IP address set of the republic of turkish can be obtained.
Illustratively, user 1 is a representative player user in adana, user 2 is a representative player user in adam, and user 3 is a representative player user in alfiegen-cartilazal.
Taking the Traceroute performed by the server in germany on 81.215.217.2 (user 1) for this IP address as an example, the specific Traceroute procedure can be as follows:
traceroute-n 81.215.217.2
traceroute to 81.215.217.2(81.215.217.2),30hops max,60byte packets
1 100.120.43.129 6.315ms 6.723ms 7.034ms
2***
3 10.196.84.13 1.198ms 1.334ms 1.380ms
4 195.122.182.137 1.649ms 195.122.180.13 0.829ms 195.122.182.1371.641ms
5***
6 129.250.3.217 1.018ms 62.115.120.6 0.692ms 129.250.9.5 0.907ms
7 129.250.5.52 1.123ms 0.984ms 1.057ms
8 129.250.3.195 26.835ms 26.423ms 83.217.231.42 26.102ms
9 83.217.231.42 26.381ms 26.399ms 26.433ms
10 195.175.172.86 36.535ms 83.217.231.42 26.377ms 212.156.139.533.598ms
11 212.156.139.5 33.574ms 33.765ms 93.155.0.242 124.996ms
12 195.175.172.86 33.828ms 93.155.0.242 124.697ms 124.634ms
13***
14***
15***
16***
in practical application, the terminal stores the result of Traceroute on the IP address in a preset storage address, and then extracts 124.634ms of the last line of time as the network delay of the IP address 81.215.217.2 through a script.
For the above-mentioned user 2 and user 3, the terminal adopts the Traceroute method for the user 1, and the network delay that the terminal can obtain the user 2 is: 130.074ms, user 3 has a network latency of 135.231 ms.
Specifically, the average network latency of the server corresponding to each of the 2 countries to each IP address in the set of IP addresses of the turkish republic may be as shown in table 1:
TABLE 1 average network latency for servers in different geographic locations
State of the country | Average network delay |
USA | 205.493ms |
Germany | 125.147ms |
As can be seen from table 1: the average network latency of a server in the united states to each IP address in the set of IP addresses of the turkish republic is 205.493ms, and the average network latency of a server in germany to each IP address in the set of IP addresses of turkish republic is 125.147 ms.
In one embodiment, the M users are M user zones. The measuring, in the preset direction, the network delay from the server corresponding to each geographic location in the candidate deployment location to each IP address in the IP address set to obtain the network delay of each geographic location includes:
measuring the network delay from a server corresponding to each geographical position in the candidate deployment positions to each type of IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the average network delay of each geographical position;
the determining the geographical location with the minimum network delay as the location of the deployment server includes:
and determining the geographical position with the minimum average network delay as the position of the deployment server.
In practical applications, the M users are M user areas in the global scope, for example, 5 user areas. The 5 user areas are turkish republic, usa, germany, uk, france, respectively. Wherein the number of the player users of the temple escape game in the country of the Turkish republic is 1000, the number of the player users of the temple escape game in the United states is 500, the number of the player users of the temple escape game in Germany is 900, the number of the player users of the temple escape game in the United kingdom is 800, and the number of the player users of the temple escape game in France is 1200.
In specific implementation, after extracting the IP address from the access log, the terminal classifies the IP address. In one embodiment, the IP address is classified according to the country attribute by performing whois query on the IP address to determine the country information to which the IP address belongs. Taking whois query for IP address 81.215.217.2 as an example, a specific query process may be as shown in fig. 2B. And the terminal inquires the result of the query through the' count: the tr "field may know that the IP address is an IP address in the turkish republic.
Illustratively, the terminal divides the IP addresses extracted from the access log into 5 IP address sets, wherein the 1 st IP address set is an IP address of turkish republic, the 2 nd IP address set is an IP address of the united states, the 3 rd IP address set is an IP address of germany, the 4 th IP address set is an IP address of the united kingdom, and the 5 th IP address set is an IP address of the france. Wherein the candidate deployment location of the server is germany, usa. In an actual application scenario, a server is actually deployed in each geographic location in the candidate deployment location, then, the terminal performs Traceroute on the IP addresses in the 5 IP address sets, so as to obtain a network delay from the server corresponding to each of the 2 countries to each IP address in the 5 IP address sets, and then, performs an average operation on the obtained network delay, so as to obtain an average network delay from the server corresponding to each of the 2 countries of the candidate deployment server to the IP address in the 5 IP address sets, specifically, the average network delay from the server corresponding to each of the 2 countries of the candidate deployment server to the IP address in the 5 IP address sets may be as shown in table 2:
TABLE 2 average network latencies for servers in different geographic locations
And step S104, determining the geographical position with the minimum network delay as the position of the deployment server.
As mentioned above, when M users are M users in the same area, for example, 3 users in the turkish republic. As shown in table 1, after obtaining the average network latency of the server in the united states to each IP address in the set of IP addresses for the turkish republic and the average network latency of the server in germany to each IP address in the set of IP addresses for the turkish republic, the geographic location where the average network latency is the smallest is determined as the location where the server is deployed by comparing the average network latency of the server in germany to each IP address in the set of IP addresses for the turkish republic with the average network latency of the server in the united states to each IP address in the set of IP addresses for the turkish republic. For example, the average network latency from the server in germany to each IP address in the set of IP addresses corresponding to the turkish republic is 125.147ms, the average network latency from the server in the united states to each IP address in the set of IP addresses corresponding to the turkish republic is 205.493ms, and the terminal determines that the server in germany provides network services to the player users in the turkish republic after comparing the two average network latencies.
As described above, when M users are M user areas, for example, 5 user areas. As shown in table 2, after obtaining the average network delays from the servers in the united states to the above 5 countries and the average network delays from the servers in germany to the above 5 countries, the terminal determines that the deployment location of the server is germany after comparison.
In a specific implementation, after determining a geographic location where a server may be deployed, a game operator may deploy one server or multiple servers (e.g., a server cluster) in the geographic location. It is understood that in the case where the number of servers is plural, a better network service can be provided to the game user.
Taking a server cluster as an example, see fig. 2C, which is a schematic structural diagram of a scalable load balancing server cluster provided in an embodiment of the present invention, where the server cluster includes a scheduler 2, a first server 4, a second server 6, and a third server 8. In practical application, the number of the servers in the load balancing server cluster can be increased or decreased in a targeted manner according to the access amount of the user, so that unnecessary resource waste is avoided while the access requirement of the user is met.
In a particular implementation, the dispatcher 2 receives a plurality of access requests that are routed by the dispatcher 2 to one or more of the servers 4, 6 and 8. The purpose of the load balancing mechanism in the server cluster is as follows: each of the servers 4, 6 and 8 forming the server cluster is fully utilized and situations are avoided where some of the servers are relatively busy and others are relatively idle. Furthermore, the scheduling method herein may include, but is not limited to: random selection, polling, least busy, etc.
According to the embodiment of the invention, the network time delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set is measured along the preset direction, and then the geographical position with the minimum network time delay is determined as the position of the deployment server after the network time delays corresponding to the plurality of geographical positions are obtained.
In order to better implement the method of the embodiment of the present invention, the embodiment of the present invention further describes a schematic structural diagram of a server deployment apparatus that belongs to the same inventive concept as the method embodiment described in fig. 1B. The following detailed description is made with reference to the accompanying drawings:
As shown in fig. 3A, the server deployment apparatus 30 may include:
an obtaining unit 300, configured to obtain respective IP addresses corresponding to M users, to obtain an IP address set;
a measuring unit 302, configured to measure, along a preset direction, network delay from a server corresponding to each geographic location in the candidate deployment location to each IP address in the IP address set, so as to obtain network delay of each geographic location;
a first determining unit 304, configured to determine a geographical location where network latency is the minimum as the location of the deployment server.
Optionally, the M users are M users in the same area; the measurement unit 302 is specifically configured to:
and measuring the network delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the network delay of each geographical position.
Optionally, the M users are M user areas; the measurement unit is specifically configured to:
measuring the network delay from a server corresponding to each geographical position in the candidate deployment positions to each type of IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the average network delay of each geographical position;
The first determining unit is specifically configured to:
and determining the geographical position with the minimum average network delay as the position of the deployment server.
Optionally, as shown in fig. 3B, the apparatus 30 further includes:
a second determining unit 306, configured to obtain, by the obtaining unit 300, the IP addresses corresponding to the M users, and determine the candidate deployment location before obtaining the IP address set.
Optionally, one or more servers are deployed at the determined location of the deployment server.
According to the embodiment of the invention, the terminal measures the network delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set along the preset direction, and then determines the geographical position with the minimum network delay as the position of the deployment server after the network delays corresponding to the plurality of geographical positions are obtained, so that the optimal deployment position of the server can be determined, and high-quality network service is provided for a plurality of users.
In order to better implement the above scheme of the embodiment of the present invention, the present invention further provides another terminal, which is described in detail below with reference to the accompanying drawings:
as shown in fig. 4, which is a schematic structural diagram of the terminal provided in the embodiment of the present invention, the terminal 60 may include a processor 401, a memory 404, and a communication module 405, and the processor 401, the memory 404, and the communication module 405 may be connected to each other through a bus 406. The Memory 404 may be a Random Access Memory (RAM) Memory or a non-volatile Memory (e.g., at least one disk Memory). The memory 404 may optionally be at least one memory system located remotely from the aforementioned processor 401. The memory 404 is used for storing application program codes, and may include an operating system, a network communication module, a user interface module, and a data processing program, and the communication module 405 is used for information interaction with an external device; the processor 401 is configured to call the program code, and perform the following steps:
Acquiring IP addresses corresponding to M users respectively to obtain an IP address set;
measuring the network delay from a server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set along a preset direction to obtain the network delay of each geographical position;
and determining the geographical position with the minimum network delay as the position of the deployment server.
Wherein the M users are M users in the same area;
the processor 401 measures, in a preset direction, a network delay from a server corresponding to each geographic location in the candidate deployment location to each IP address in the IP address set, to obtain the network delay of each geographic location, and may include:
and measuring the network delay from the server corresponding to each geographical position in the candidate deployment positions to each IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the network delay of each geographical position.
Wherein the M users are M user areas;
the processor 401 measures, in a preset direction, a network delay from a server corresponding to each geographic location in the candidate deployment location to each IP address in the IP address set, to obtain the network delay of each geographic location, and may include:
Measuring the network delay from a server corresponding to each geographical position in the candidate deployment positions to each type of IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the average network delay of each geographical position;
the determining, by the processor 401, the geographical location with the minimum network latency as the location of the deployment server may include:
the geographical location where the average network latency is the smallest is determined as the location of the deployment server,
wherein, before the processor 401 obtains the respective corresponding IP addresses of the M users and obtains the IP address set, the method further includes:
determining the candidate deployment location.
Wherein, one or more servers are deployed at the determined position of the deployment server.
It should be noted that, for the execution step of the processor in the terminal 40 in the embodiment of the present invention, reference may be made to the specific implementation manner of the terminal operation in the embodiment of fig. 1B in the foregoing method embodiments, and details are not described here again.
In a specific implementation, the terminal 40 may include various devices that can be used by a user, such as a Mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and an intelligent wearable Device (e.g., a smart watch and a smart bracelet), and the embodiments of the present invention are not limited in particular.
An embodiment of the present invention further provides a computer storage medium, configured to store computer software instructions for the terminal shown in fig. 1B, which include a program for executing the method according to the embodiment of the present invention. By executing the stored program, the deployment location of the server can be determined, so that better network service can be provided for the user.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (2)
1. A server deployment method, comprising:
determining candidate deployment locations, comprising: acquiring the number of users in a plurality of different geographic positions, and determining the geographic position in which the number of users in the geographic position exceeds a set threshold value as a candidate deployment position;
acquiring IP addresses corresponding to M users respectively to obtain an IP address set, wherein the M users are M users in the same area or M user areas;
when the M users are M users in the same area, measuring the network delay from a server corresponding to each geographic position in the candidate deployment position to each IP address in the IP address set by adopting a Traceroute method along a preset direction to obtain the network delay of each geographic position; determining the geographical position with the minimum network delay as the position of a deployment server;
when the M users are M user areas, measuring the network delay from a server corresponding to each geographic position in the candidate deployment position to each type of IP address in the IP address set by adopting a Traceroute method along a preset direction, and carrying out average operation on the network delay to obtain the average network delay of each geographic position; determining the geographical position with the minimum average network delay as the position of a deployment server;
And deploying one or more servers in a scalable load balancing mode at the determined positions of the deployed servers.
2. A server deployment apparatus, comprising:
a second determining unit, configured to obtain, by the obtaining unit, the IP addresses corresponding to the M users, and determine the candidate deployment location before obtaining the IP address set, where the second determining unit includes: acquiring the number of users in a plurality of different geographic positions, and determining the geographic position in which the number of users in the geographic position exceeds a set threshold value as a candidate deployment position;
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring IP addresses corresponding to M users respectively to obtain an IP address set, and the M users are M users in the same area or M user areas;
a measuring unit, configured to measure, by using a Traceroute method, network delay from a server corresponding to each geographic location in the candidate deployment location to each IP address in the IP address set in a preset direction when the M users are M users in the same area, so as to obtain network delay of each geographic location; the network deployment method is further used for measuring network delay from a server corresponding to each geographic position in the candidate deployment position to each type of IP address in the IP address set by adopting a Traceroute method along a preset direction when the M users are M user areas, and carrying out averaging operation on the network delay to obtain average network delay of each geographic position;
A first determining unit, configured to determine, when the M users are M users in the same area, a geographic location where the network latency is the minimum as a location of a deployment server; and when the M users are M user areas, determining the geographical location with the minimum average network delay as the location of the deployment server, and deploying one or more servers in a scalable load balancing manner at the determined location of the deployment server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811566494.4A CN109768897B (en) | 2018-12-20 | 2018-12-20 | Server deployment method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811566494.4A CN109768897B (en) | 2018-12-20 | 2018-12-20 | Server deployment method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109768897A CN109768897A (en) | 2019-05-17 |
CN109768897B true CN109768897B (en) | 2022-07-29 |
Family
ID=66450778
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811566494.4A Active CN109768897B (en) | 2018-12-20 | 2018-12-20 | Server deployment method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109768897B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111181798B (en) * | 2019-08-28 | 2022-07-22 | 腾讯科技(深圳)有限公司 | Network delay measuring method, device, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014161228A1 (en) * | 2013-03-30 | 2014-10-09 | 清华大学 | Method and server for locating ip position by using position data of mobile terminal |
CN105007233A (en) * | 2015-07-13 | 2015-10-28 | 互联网域名系统北京市工程研究中心有限公司 | Method for distributing address based on DHCP (dynamic host configuration protocol) server cluster load |
CN106067879A (en) * | 2016-06-07 | 2016-11-02 | 腾讯科技(深圳)有限公司 | The detection method of information and device |
CN107071089A (en) * | 2017-05-18 | 2017-08-18 | 腾讯科技(深圳)有限公司 | Dispatch control method, device and system |
CN109040771A (en) * | 2018-07-20 | 2018-12-18 | 北京交通大学 | Based on the video cache method and system to cooperate between more cache servers |
-
2018
- 2018-12-20 CN CN201811566494.4A patent/CN109768897B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014161228A1 (en) * | 2013-03-30 | 2014-10-09 | 清华大学 | Method and server for locating ip position by using position data of mobile terminal |
CN105007233A (en) * | 2015-07-13 | 2015-10-28 | 互联网域名系统北京市工程研究中心有限公司 | Method for distributing address based on DHCP (dynamic host configuration protocol) server cluster load |
CN106067879A (en) * | 2016-06-07 | 2016-11-02 | 腾讯科技(深圳)有限公司 | The detection method of information and device |
CN107071089A (en) * | 2017-05-18 | 2017-08-18 | 腾讯科技(深圳)有限公司 | Dispatch control method, device and system |
CN109040771A (en) * | 2018-07-20 | 2018-12-18 | 北京交通大学 | Based on the video cache method and system to cooperate between more cache servers |
Also Published As
Publication number | Publication date |
---|---|
CN109768897A (en) | 2019-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9544355B2 (en) | Methods and apparatus for realizing short URL service | |
CN108776934B (en) | Distributed data calculation method and device, computer equipment and readable storage medium | |
EP3637733A1 (en) | Load balancing engine, client, distributed computing system, and load balancing method | |
US10080158B2 (en) | Providing multiple interfaces for traffic | |
US20170085621A1 (en) | Estimating latency of an application | |
CN113037869B (en) | Method and apparatus for back-sourcing of content distribution network system | |
KR20110053906A (en) | Method and system for optimization of multimedia service over ims network | |
CN109831532B (en) | Data sharing method, device, equipment and medium | |
CN105468513B (en) | Test method, device and system based on mobile terminal | |
CN106155458B (en) | Multimedia message playing method and device | |
CN112260853A (en) | Disaster recovery switching method and device, storage medium and electronic equipment | |
CN112653670A (en) | Service logic vulnerability detection method, device, storage medium and terminal | |
CN107888717A (en) | A kind of domain name determines method, apparatus and electronic equipment | |
CN114095567A (en) | Data access request processing method and device, computer equipment and medium | |
US20150156149A1 (en) | Method and apparatus for sharing content from third party websites via messaging | |
US10700879B2 (en) | Charging method and device, access device, service quality control method and device | |
CN116431282A (en) | Cloud virtual host server management method, device, equipment and storage medium | |
CN109768897B (en) | Server deployment method and device | |
US20140026066A1 (en) | User interaction-based website optimization | |
CN109905486B (en) | Application program identification display method and device | |
CN112073215B (en) | Method for realizing application and service controller | |
CN110730300A (en) | Camera control method, device, storage medium and terminal | |
US20160020970A1 (en) | Router and information-collection method thereof | |
WO2023098012A1 (en) | Bullet comment display method and apparatus | |
KR20130089900A (en) | Method for simultaneously processing advertisement material at internet mobile device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A server deployment method and device Effective date of registration: 20230804 Granted publication date: 20220729 Pledgee: Shenzhen small and medium sized small loan Co.,Ltd. Pledgor: SHENZHEN IDREAMSKY TECHNOLOGY CO.,LTD. Registration number: Y2023980051010 |