Go to Main Contents

:: Industry developments

The WiFi certification system is a performance bottleneck analysis and response programme in high-situation settings

WiFi certification doesn't normally seem to be very demanding.——The guests play WiFi, Portal pages, enter the authentication code, and the process may take a dozen seconds to produce a request for certification.

Your position:Home > Content Centre > Industry News > > Text

WiFi certification doesn't normally seem to be very demanding.——The customer may have a request for certification in WiFi, playing Portal pages, and entering the authentication code. But at a given point of time, the situation is quite different: hotels are at their peaks between 8 and 11 p.m., during which hundreds may start to process certification; when the mall is active, people can come five to ten times more quickly; students collectively brush WiFi ' s mobile phone before evening lights out in school dorms, and requests for certification erupt instantaneously.

The bottlenecks are usually not in CPU, in connection with IO.

The people who did performance analysis should know that the government is not going to be able to do it.WiFi certification systemThe same bottleneck is not usually used for CPU calculations, and the authentication logic itself does not consume much CPU resources.——Each authentication request is to create a new database connection, which has been rejected by the peak number of connections and all subsequent certification requests are queued.——The HTTP request for SMS is quickly depleted if it has a 10-second timeout, and the high-time transmission is blocked by a large number of lines waiting for SMSAPI to respond.——Linux has a default document character cap of 1024, and the certification service as high-sending service can be denied new connections because the file descriptive is exhausted if it does not adjust this parameter to several hundred.

The solution to the problem of database connections is not simply to build a large pool of connections. The bigger the connection, the less each connection will be used and the number of links on the database end will be capped. The correct approach is: to minimize the number of interactions with databases in authentication request processing. Load some configuration data (such as authentication strategy, black and white list rules) that are read at high frequency but have low frequency changes into memory caches, refresh them regularly, verify requests directly from memory caches, and do not search the database. Only those operations where authentication records are written and user status updates must be stored are available.——The temporary status of the authentication process (e.g., certification code, authentication session token) is located in Redis and does not place pressure on the main database either quickly or quickly.

External API calls block problems are solved by a heterogeneity. When an authentication request requires SMS gateways to send the authentication code, the main thread should not wait for SMSAPI returns simultaneously, but throw the sending task into the message queue and then use an angular echo to receive the results. The main line is returned immediately."Could not close temporary folder: %s"For the front end, the accelerator process actual API calls from backstage. This does not block other authentication requests even if external API responses are slow.

The issue of connectivity needs to be addressed at the systemic level.

In addition to raising the cap on document descriptors, attention needs to be paid to mechanisms for connecting to reuse.——Like calling text-message gateways, calling micro-creative public interfaces.——The connection pool should be used to reuse the TCP, instead of creating a new connection each time you request it and closing it. HTTP Keep-Alive, with a reasonable connection pool configuration, reduces large amounts of TCP handshake costs in high-complex settings.

There is another easy to ignore connection problem: NATSHEL_AUTH_GATEWAY and wireless AP. If each AP maintains a long link with NATSHEL_AUTH_GATEWAY for the transmission of authorization instructions, TCP connections to gateways are in itself a pressure when there are hundreds of more APs. Consideration should be given to changing the mechanism for sending authorized commands from a direct link AP to a message center, where AP subscribes to information that it cares about. The gateways are then required to maintain a small number of connections with the message intermediate, and the increase in AP numbers does not affect the connection load.

Stream limits and queues are effective means of levelling peaks.

Even with all the performance optimizations, any system has its own physical carrying ceiling. When a request is sent in excess of the maximum that the system can handle, rather than allowing all requests to enter into the system and cause it to collapse, it is better to move forward voluntarily and line up."More people are currently using it. Please try again later"and directs the user to retry automatically after 10 seconds.

Queues to place requests exceeding processing capacity in an orderly queue, which is handled in the order of first-come-first-served situations."You have 15 more users ahead of you. 30 seconds to wait."The experience is certainly not as good as the certification, but it's much better than a system that collapses directly and users try again. And the queuer has time to smooth out its effects.——Users usually wait when they see the queued pages, and do not add to the burden as they would when systems collapse.

The flow limit and the queue parameter need to match the actual business scene. The maximum period of the hotel scenario is three hours later, and if the current quota is used out within the first hour, all guests for the next two hours are rejected. So the flow limit strategy should be smooth distribution by time window instead of a simple fixed rate. Queue ' s capacity also needs to be estimated in conjunction with business volume.——The estimated number of requests for certification in a 300-room hotel, at 8-11 p.m., is approximately 400 to 600 and the volume of requests (approximately 100) designed to be half an hour high in queue capacity is reasonable.

Grayscale release and pressure measurement are prerequisites for ensuring that the scene is high and unattainable.

A lot.WiFi certification systemHigh-complication problems are detected only after being online and then urgently repaired. If you can find bottlenecks before going online, a lot of complaints will be avoided. The pressure test is not run off with several combinations, but it needs to simulate the true authentication process: the device connects WiFi, triggers Portal redirection, loads the authentication page, fills authentication information, submits certification, receives a successful authentication response——The entire chain is monitored and the certification cannot be submitted to this point alone.

The pressure tools are available for both JMeter and Locust, but test scripts need to be prepared to simulate the complete authentication process, including HTTP redirectional follow-up and Cookie management. Target TPS under stress should be set by applying a 1.5 times safety factor to prevalued operations peak periods. The pressure monitoring process will continuously monitor changes in database connections, Redis memory usage, network throughput, CPU usage, external API response time, and identify the first bottlenecks that arise.

Grayscale release is a necessary tool for risk control. The new version should not be fully cut in one time, 10% traffic observation 24 hours before confirming that the certification success rate, response time, and system resource usage are not abnormal, then gradually increases the grey scale ratio. If indicators deteriorate, roll back. This mechanism will need to be matched by a load balance or a counter-agent-level flow control capability.

High-sum design is not a thing to do once and for all.——Users are growing, business scenes changing, external dependence adjusting, and performance bottlenecks change. It is much easier to keep critical performance indicators under normal monitoring, regularly review performance data, and find trends declining before intervention than waiting for users to file a massive complaint to re-check.

Access Program I'll be right back. Telephone counselling