Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[opt](proxy-protocol) Enable mysql connection with and without proxy-protocol #47907

Closed

Conversation

Nitin-Kashyap
Copy link
Contributor

@Nitin-Kashyap Nitin-Kashyap commented Feb 14, 2025

What problem does this PR solve?

Enables connection with and without proxy protocol to mysql service.

Issue Number: close #47908

Problem Summary:
When nginx enables proxy_protocol, and use health "check type=mysql"; causes check to fail.
Since, per mysql-protocol client expects server params on connect without any transmission from client, However, ProxyProtocol enabled case server expects PROXY v1/v2 header.

when nginx enables health check with type=mysql; without protocol header connection attempt is done, which will block for 600s. Effectively deselected for connection from nginx.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
      When enable_proxy_protocol=true, On direct connection to FE will have 1s wait on initial connection.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Feb 14, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@Nitin-Kashyap Nitin-Kashyap changed the title [opt] Enable mysql connection with and without proxy-protocol [opt](proxy-protocol) Enable mysql connection with and without proxy-protocol Feb 14, 2025
@Nitin-Kashyap
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 31380 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit c766e21325440dd1cdaabfb5a0d9e855d355a981, data reload: false

------ Round 1 ----------------------------------
q1	17594	5308	5057	5057
q2	2058	313	177	177
q3	10389	1234	759	759
q4	10205	1046	566	566
q5	7506	2346	2385	2346
q6	191	172	136	136
q7	905	743	593	593
q8	9314	1280	1079	1079
q9	4834	4612	4508	4508
q10	6845	2320	1887	1887
q11	464	276	256	256
q12	345	356	216	216
q13	17767	3653	3044	3044
q14	228	234	216	216
q15	527	470	462	462
q16	621	603	588	588
q17	579	863	357	357
q18	6730	6204	6096	6096
q19	1838	973	542	542
q20	313	321	196	196
q21	2762	2261	2007	2007
q22	364	342	292	292
Total cold run time: 102379 ms
Total hot run time: 31380 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5172	5115	5152	5115
q2	229	323	229	229
q3	2154	2645	2283	2283
q4	1428	1855	1362	1362
q5	4247	4163	4128	4128
q6	208	162	123	123
q7	1896	1816	1660	1660
q8	2613	2663	2608	2608
q9	7191	7168	7096	7096
q10	3026	3232	2751	2751
q11	587	515	500	500
q12	672	792	591	591
q13	3508	3755	3256	3256
q14	272	301	263	263
q15	516	465	450	450
q16	647	681	645	645
q17	1153	1575	1368	1368
q18	7581	7412	7215	7215
q19	784	818	894	818
q20	1972	2013	1892	1892
q21	5405	4980	4921	4921
q22	614	584	559	559
Total cold run time: 51875 ms
Total hot run time: 49833 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 189031 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit c766e21325440dd1cdaabfb5a0d9e855d355a981, data reload: false

query1	1310	964	933	933
query2	6232	1834	1786	1786
query3	10960	4451	4451	4451
query4	56047	25554	23334	23334
query5	4989	507	460	460
query6	331	190	174	174
query7	4943	495	284	284
query8	302	235	220	220
query9	5795	2520	2512	2512
query10	422	305	248	248
query11	15067	15330	14784	14784
query12	160	105	104	104
query13	1059	510	366	366
query14	10953	6510	6368	6368
query15	192	190	185	185
query16	7051	627	488	488
query17	1102	707	534	534
query18	1535	406	304	304
query19	194	182	162	162
query20	127	130	130	130
query21	199	123	104	104
query22	4430	4510	4398	4398
query23	34000	33199	33212	33199
query24	5686	2468	2461	2461
query25	457	507	404	404
query26	685	294	151	151
query27	1773	510	331	331
query28	2747	2437	2394	2394
query29	574	588	425	425
query30	220	193	153	153
query31	897	875	835	835
query32	74	68	62	62
query33	442	354	295	295
query34	762	842	505	505
query35	797	854	750	750
query36	969	1004	923	923
query37	117	100	76	76
query38	4232	4412	4242	4242
query39	1509	1442	1461	1442
query40	213	118	102	102
query41	51	48	55	48
query42	116	104	97	97
query43	510	514	490	490
query44	1304	792	794	792
query45	192	171	168	168
query46	889	1093	664	664
query47	1894	1850	1774	1774
query48	381	437	305	305
query49	693	521	424	424
query50	720	814	423	423
query51	4230	4336	4189	4189
query52	112	104	92	92
query53	231	250	191	191
query54	481	502	430	430
query55	97	83	81	81
query56	260	272	282	272
query57	1169	1188	1145	1145
query58	237	245	237	237
query59	2750	2764	2556	2556
query60	290	273	263	263
query61	118	112	137	112
query62	719	736	699	699
query63	240	199	199	199
query64	1630	1146	669	669
query65	3218	3134	3112	3112
query66	708	382	302	302
query67	15912	15491	15396	15396
query68	3871	772	501	501
query69	484	303	260	260
query70	1218	1110	1115	1110
query71	421	307	276	276
query72	6238	3664	3587	3587
query73	747	699	349	349
query74	8877	9198	8738	8738
query75	3193	3156	2752	2752
query76	2732	1159	719	719
query77	537	344	283	283
query78	10099	10151	9301	9301
query79	1483	804	587	587
query80	854	521	459	459
query81	521	271	240	240
query82	411	125	98	98
query83	201	168	147	147
query84	278	99	73	73
query85	733	335	298	298
query86	346	313	291	291
query87	4486	4482	4371	4371
query88	2857	2190	2158	2158
query89	393	310	298	298
query90	1662	191	191	191
query91	146	140	112	112
query92	61	61	55	55
query93	1229	1014	573	573
query94	607	412	294	294
query95	379	259	258	258
query96	481	537	273	273
query97	2801	2883	2738	2738
query98	236	205	199	199
query99	1314	1395	1233	1233
Total cold run time: 288602 ms
Total hot run time: 189031 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.31 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit c766e21325440dd1cdaabfb5a0d9e855d355a981, data reload: false

query1	0.03	0.04	0.03
query2	0.07	0.03	0.03
query3	0.24	0.07	0.06
query4	1.61	0.10	0.10
query5	0.42	0.43	0.39
query6	1.15	0.66	0.67
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.61	0.53	0.52
query10	0.57	0.58	0.57
query11	0.16	0.10	0.10
query12	0.14	0.11	0.12
query13	0.62	0.60	0.60
query14	2.75	2.69	2.68
query15	0.93	0.85	0.84
query16	0.39	0.37	0.37
query17	1.01	1.02	1.05
query18	0.21	0.19	0.19
query19	1.91	1.80	1.97
query20	0.01	0.01	0.02
query21	15.35	0.90	0.56
query22	0.75	1.14	0.71
query23	14.95	1.39	0.61
query24	12.40	1.07	0.44
query25	0.34	0.11	0.14
query26	0.97	0.20	0.15
query27	0.05	0.04	0.04
query28	5.95	0.81	0.45
query29	12.54	4.00	3.32
query30	0.25	0.09	0.07
query31	2.89	0.61	0.39
query32	3.23	0.56	0.47
query33	3.00	3.05	3.07
query34	15.64	5.14	4.48
query35	4.53	4.52	4.54
query36	0.66	0.52	0.49
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.02
query40	0.17	0.13	0.13
query41	0.08	0.03	0.03
query42	0.03	0.02	0.02
query43	0.04	0.03	0.02
Total cold run time: 106.88 s
Total hot run time: 30.31 s

@Nitin-Kashyap
Copy link
Contributor Author

looks like #47776 fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Nginx health check type=mysql with proxy_protocol enabled doesn't connect to Doris FE
3 participants